mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-10 23:38: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
|
||||
*/
|
||||
|
||||
import type { ActionFunctionArgs } from "@remix-run/node";
|
||||
import { json } from "@remix-run/node";
|
||||
import { type ActionFunctionArgs , json } from "@remix-run/node";
|
||||
import Stripe from "stripe";
|
||||
import { prisma } from "~/db.server";
|
||||
import { BILLING_CONFIG, getPlanConfig } from "~/config/billing.server";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
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> {
|
||||
const query = `
|
||||
|
||||
@ -61,7 +61,7 @@ async function createMcpServer(
|
||||
const { name, arguments: args } = request.params;
|
||||
|
||||
// Handle memory tools
|
||||
if (name.startsWith("memory_") || name.startsWith("get_")) {
|
||||
if (name.startsWith("memory_")) {
|
||||
return await callMemoryTool(name, args, userId, source);
|
||||
}
|
||||
|
||||
|
||||
@ -80,7 +80,7 @@ export const memoryTools = [
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "get_user_profile",
|
||||
name: "memory_about_user",
|
||||
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.",
|
||||
inputSchema: {
|
||||
@ -110,7 +110,7 @@ export async function callMemoryTool(
|
||||
return await handleMemorySearch({ ...args, userId, source });
|
||||
case "memory_get_spaces":
|
||||
return await handleMemoryGetSpaces(userId);
|
||||
case "get_user_profile":
|
||||
case "memory_about_user":
|
||||
return await handleUserProfile(userId);
|
||||
default:
|
||||
throw new Error(`Unknown memory tool: ${toolName}`);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user