diff options
| author | Mohamed Bassem <me@mbassem.com> | 2025-04-27 01:57:41 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2025-04-27 01:57:41 +0000 |
| commit | 1a24eb690803292286513404d27a0955d2b7ab44 (patch) | |
| tree | 6c15e8414bc1567547a38e33d4e1fb631a1388da /apps/mcp/src/lists.ts | |
| parent | d3cf3e4d5eec8bc7b46c568910f7a49eab2b12cb (diff) | |
| download | karakeep-1a24eb690803292286513404d27a0955d2b7ab44.tar.zst | |
fix(mcp): Ditch JSON and respond in plain text
Diffstat (limited to 'apps/mcp/src/lists.ts')
| -rw-r--r-- | apps/mcp/src/lists.ts | 18 |
1 files changed, 14 insertions, 4 deletions
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"), + }, + ], }; }, ); |
