From 6bae11967ef375fec7eca4e9eac27cda1504623a Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Thu, 17 Apr 2025 22:26:09 +0000 Subject: fix(mcp): Reduce number of MCP tools and add support for pagination --- apps/mcp/src/lists.ts | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) (limited to 'apps/mcp/src/lists.ts') diff --git a/apps/mcp/src/lists.ts b/apps/mcp/src/lists.ts index eee1cc96..36eb6661 100644 --- a/apps/mcp/src/lists.ts +++ b/apps/mcp/src/lists.ts @@ -2,7 +2,7 @@ import { CallToolResult } from "@modelcontextprotocol/sdk/types"; import { z } from "zod"; import { karakeepClient, mcpServer } from "./shared"; -import { compactBookmark, toMcpToolError } from "./utils"; +import { toMcpToolError } from "./utils"; mcpServer.tool( "get-lists", @@ -21,35 +21,6 @@ mcpServer.tool( }, ); -mcpServer.tool( - "get-bookmarks-in-list", - `Search for bookmarks matching a specific a query.`, - { - listId: z.string().describe(`The listId to search in.`), - }, - async ({ listId }): Promise => { - const res = await karakeepClient.GET(`/lists/{listId}/bookmarks`, { - params: { - path: { - listId, - }, - query: { - includeContent: false, - }, - }, - }); - if (res.error) { - return toMcpToolError(res.error); - } - return { - content: res.data.bookmarks.map((bookmark) => ({ - type: "text", - text: JSON.stringify(compactBookmark(bookmark)), - })), - }; - }, -); - mcpServer.tool( "add-bookmark-to-list", `Add a bookmark to a list.`, -- cgit v1.2.3-70-g09d2