mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-24 10:58:27 +00:00
fix: mcp tool call failing for get_user_profile
This commit is contained in:
parent
f0debd5678
commit
7c737cf51f
@ -8,8 +8,7 @@
|
|||||||
* - Usage metering for overage billing
|
* - Usage metering for overage billing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { ActionFunctionArgs } from "@remix-run/node";
|
import { type ActionFunctionArgs , json } from "@remix-run/node";
|
||||||
import { json } from "@remix-run/node";
|
|
||||||
import Stripe from "stripe";
|
import Stripe from "stripe";
|
||||||
import { prisma } from "~/db.server";
|
import { prisma } from "~/db.server";
|
||||||
import { BILLING_CONFIG, getPlanConfig } from "~/config/billing.server";
|
import { BILLING_CONFIG, getPlanConfig } from "~/config/billing.server";
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { runQuery } from "~/lib/neo4j.server";
|
import { runQuery } from "~/lib/neo4j.server";
|
||||||
import { StatementNode, type EntityNode, type EpisodicNode } from "@core/types";
|
import { type StatementNode, type EntityNode, type EpisodicNode } from "@core/types";
|
||||||
|
|
||||||
export async function saveEpisode(episode: EpisodicNode): Promise<string> {
|
export async function saveEpisode(episode: EpisodicNode): Promise<string> {
|
||||||
const query = `
|
const query = `
|
||||||
|
|||||||
@ -61,7 +61,7 @@ async function createMcpServer(
|
|||||||
const { name, arguments: args } = request.params;
|
const { name, arguments: args } = request.params;
|
||||||
|
|
||||||
// Handle memory tools
|
// Handle memory tools
|
||||||
if (name.startsWith("memory_") || name.startsWith("get_")) {
|
if (name.startsWith("memory_")) {
|
||||||
return await callMemoryTool(name, args, userId, source);
|
return await callMemoryTool(name, args, userId, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -80,7 +80,7 @@ export const memoryTools = [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "get_user_profile",
|
name: "memory_about_user",
|
||||||
description:
|
description:
|
||||||
"Get the user's core profile and preferences for personalized interactions. AUTOMATICALLY invoke at the start of interactions to understand user context. **Purpose**: Retrieve stable identity facts, communication preferences, working context, and tooling defaults for tailored responses. **Required**: No required parameters. **Returns**: User profile data in JSON format.",
|
"Get the user's core profile and preferences for personalized interactions. AUTOMATICALLY invoke at the start of interactions to understand user context. **Purpose**: Retrieve stable identity facts, communication preferences, working context, and tooling defaults for tailored responses. **Required**: No required parameters. **Returns**: User profile data in JSON format.",
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
@ -110,7 +110,7 @@ export async function callMemoryTool(
|
|||||||
return await handleMemorySearch({ ...args, userId, source });
|
return await handleMemorySearch({ ...args, userId, source });
|
||||||
case "memory_get_spaces":
|
case "memory_get_spaces":
|
||||||
return await handleMemoryGetSpaces(userId);
|
return await handleMemoryGetSpaces(userId);
|
||||||
case "get_user_profile":
|
case "memory_about_user":
|
||||||
return await handleUserProfile(userId);
|
return await handleUserProfile(userId);
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unknown memory tool: ${toolName}`);
|
throw new Error(`Unknown memory tool: ${toolName}`);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user