From 8c6cfc8f5fdab4bbdae41060518c08731720976a Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sun, 13 Apr 2025 13:47:40 +0000 Subject: fix(mcp): compact the response of get bookmark lists --- apps/mcp/src/lists.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apps/mcp/src/lists.ts') 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)), })), }; }, -- cgit v1.2.3-70-g09d2