From 1a24eb690803292286513404d27a0955d2b7ab44 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sun, 27 Apr 2025 01:57:41 +0000 Subject: fix(mcp): Ditch JSON and respond in plain text --- apps/mcp/src/bookmarks.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'apps/mcp/src/bookmarks.ts') diff --git a/apps/mcp/src/bookmarks.ts b/apps/mcp/src/bookmarks.ts index 62893f2f..747bcd18 100644 --- a/apps/mcp/src/bookmarks.ts +++ b/apps/mcp/src/bookmarks.ts @@ -57,13 +57,13 @@ machine learning is:fav`), } return { content: [ - ...res.data.bookmarks.map((bookmark) => ({ - type: "text" as const, - text: JSON.stringify(compactBookmark(bookmark)), - })), { type: "text", - text: `Next cursor: ${res.data.nextCursor ? `'${res.data.nextCursor}'` : "no more pages"}`, + text: ` +${res.data.bookmarks.map(compactBookmark).join("\n\n")} + +Next cursor: ${res.data.nextCursor ? `'${res.data.nextCursor}'` : "no more pages"} +`, }, ], }; @@ -94,7 +94,7 @@ mcpServer.tool( content: [ { type: "text", - text: JSON.stringify(compactBookmark(res.data)), + text: compactBookmark(res.data), }, ], }; @@ -137,7 +137,7 @@ mcpServer.tool( content: [ { type: "text", - text: JSON.stringify(compactBookmark(res.data)), + text: compactBookmark(res.data), }, ], }; -- cgit v1.2.3-70-g09d2