aboutsummaryrefslogtreecommitdiffstats
path: root/apps/mcp/src/lists.ts
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-04-17 22:26:09 +0000
committerMohamed Bassem <me@mbassem.com>2025-04-17 23:10:10 +0000
commit6bae11967ef375fec7eca4e9eac27cda1504623a (patch)
treee2563620eff27e572d1b84edd591cd87824b2c43 /apps/mcp/src/lists.ts
parent293a4a0d0f7e9ef0c23b3b7494bdc05dd28b131b (diff)
downloadkarakeep-6bae11967ef375fec7eca4e9eac27cda1504623a.tar.zst
fix(mcp): Reduce number of MCP tools and add support for pagination
Diffstat (limited to 'apps/mcp/src/lists.ts')
-rw-r--r--apps/mcp/src/lists.ts31
1 files changed, 1 insertions, 30 deletions
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",
@@ -22,35 +22,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<CallToolResult> => {
- 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.`,
{