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/lists.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'apps/mcp/src/lists.ts') diff --git a/apps/mcp/src/lists.ts b/apps/mcp/src/lists.ts index 36eb6661..242229cb 100644 --- a/apps/mcp/src/lists.ts +++ b/apps/mcp/src/lists.ts @@ -13,10 +13,20 @@ mcpServer.tool( return toMcpToolError(res.error); } return { - content: res.data.lists.map((list) => ({ - type: "text", - text: JSON.stringify(list), - })), + content: [ + { + type: "text", + text: res.data.lists + .map( + (list) => ` +List ID: ${list.id} +Name: ${list.icon} ${list.name} +Description: ${list.description ?? ""} +Parent ID: ${list.parentId}`, + ) + .join("\n\n"), + }, + ], }; }, ); -- cgit v1.2.3-70-g09d2