From ef73a61035bff78bb4ba6eea80217b425d6f3165 Mon Sep 17 00:00:00 2001 From: Harshith Mullapudi Date: Tue, 2 Sep 2025 20:14:18 +0530 Subject: [PATCH] fix: mcp return --- apps/webapp/app/services/postAuth.server.ts | 1 - apps/webapp/app/utils/mcp/memory.ts | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/webapp/app/services/postAuth.server.ts b/apps/webapp/app/services/postAuth.server.ts index 7c91726..d95026c 100644 --- a/apps/webapp/app/services/postAuth.server.ts +++ b/apps/webapp/app/services/postAuth.server.ts @@ -1,6 +1,5 @@ import type { User } from "~/models/user.server"; import { createWorkspace } from "~/models/workspace.server"; -import { singleton } from "~/utils/singleton"; export async function postAuthentication({ user, diff --git a/apps/webapp/app/utils/mcp/memory.ts b/apps/webapp/app/utils/mcp/memory.ts index c6bd5a9..44a9141 100644 --- a/apps/webapp/app/utils/mcp/memory.ts +++ b/apps/webapp/app/utils/mcp/memory.ts @@ -111,7 +111,7 @@ export async function callMemoryTool( // Handler for memory_ingest async function handleMemoryIngest(args: any) { try { - const response = addToQueue( + const response = await addToQueue( { episodeBody: args.message, referenceTime: new Date().toISOString(), @@ -124,7 +124,10 @@ async function handleMemoryIngest(args: any) { content: [ { type: "text", - text: JSON.stringify(response), + text: JSON.stringify({ + success: true, + id: response.id, + }), }, ], };