diff options
| author | Mohamed Bassem <me@mbassem.com> | 2025-04-13 13:47:40 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2025-04-13 13:47:40 +0000 |
| commit | 8c6cfc8f5fdab4bbdae41060518c08731720976a (patch) | |
| tree | 9e0bf2cbd2e61342380f295faaec88e014c33fa9 /apps/mcp/src/lists.ts | |
| parent | 46277c74d5df376e4350cb3c8035ec9dda329a7a (diff) | |
| download | karakeep-8c6cfc8f5fdab4bbdae41060518c08731720976a.tar.zst | |
fix(mcp): compact the response of get bookmark lists
Diffstat (limited to 'apps/mcp/src/lists.ts')
| -rw-r--r-- | apps/mcp/src/lists.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/mcp/src/lists.ts b/apps/mcp/src/lists.ts index 6cfe1d13..1e0f3a8a 100644 --- a/apps/mcp/src/lists.ts +++ b/apps/mcp/src/lists.ts @@ -1,7 +1,8 @@ import { CallToolResult } from "@modelcontextprotocol/sdk/types"; import { z } from "zod"; -import { karakeepClient, mcpServer, toMcpToolError } from "./shared"; +import { karakeepClient, mcpServer } from "./shared"; +import { compactBookmark, toMcpToolError } from "./utils"; mcpServer.tool( "get-lists", @@ -40,7 +41,7 @@ mcpServer.tool( return { content: res.data.bookmarks.map((bookmark) => ({ type: "text", - text: JSON.stringify(bookmark), + text: JSON.stringify(compactBookmark(bookmark)), })), }; }, |
