stickyrice-mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +156 -0
- package/dist/auth.d.ts +4 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +112 -0
- package/dist/auth.js.map +1 -0
- package/dist/config.d.ts +11 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +40 -0
- package/dist/config.js.map +1 -0
- package/dist/convex-client.d.ts +18 -0
- package/dist/convex-client.d.ts.map +1 -0
- package/dist/convex-client.js +73 -0
- package/dist/convex-client.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +79 -0
- package/dist/index.js.map +1 -0
- package/dist/resources/index.d.ts +11 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +73 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/server.d.ts +5 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +46 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/boards.d.ts +5 -0
- package/dist/tools/boards.d.ts.map +1 -0
- package/dist/tools/boards.js +156 -0
- package/dist/tools/boards.js.map +1 -0
- package/dist/tools/columns.d.ts +5 -0
- package/dist/tools/columns.d.ts.map +1 -0
- package/dist/tools/columns.js +101 -0
- package/dist/tools/columns.js.map +1 -0
- package/dist/tools/index.d.ts +10 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +55 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/note-items.d.ts +5 -0
- package/dist/tools/note-items.d.ts.map +1 -0
- package/dist/tools/note-items.js +99 -0
- package/dist/tools/note-items.js.map +1 -0
- package/dist/tools/notes.d.ts +5 -0
- package/dist/tools/notes.d.ts.map +1 -0
- package/dist/tools/notes.js +227 -0
- package/dist/tools/notes.js.map +1 -0
- package/dist/tools/tags.d.ts +5 -0
- package/dist/tools/tags.d.ts.map +1 -0
- package/dist/tools/tags.js +99 -0
- package/dist/tools/tags.js.map +1 -0
- package/dist/tools/workspaces.d.ts +5 -0
- package/dist/tools/workspaces.d.ts.map +1 -0
- package/dist/tools/workspaces.js +96 -0
- package/dist/tools/workspaces.js.map +1 -0
- package/package.json +49 -0
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
2
|
+
import { StickyRiceClient } from "./convex-client.js";
|
|
3
|
+
export declare function createServer(client: StickyRiceClient): Promise<Server>;
|
|
4
|
+
export declare function runServer(client: StickyRiceClient): Promise<void>;
|
|
5
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAQnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAItD,wBAAsB,YAAY,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAqC5E;AAED,wBAAsB,SAAS,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAKvE"}
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Note: Using Server instead of McpServer because we need low-level control
|
|
2
|
+
// over request handling. McpServer is designed for higher-level patterns where
|
|
3
|
+
// you register individual tools/resources. Our implementation manually handles
|
|
4
|
+
// ListTools, CallTool, etc. schemas and routes to custom handlers.
|
|
5
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
6
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
7
|
+
import { CallToolRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, ReadResourceRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
8
|
+
import { getTools, handleToolCall } from "./tools/index.js";
|
|
9
|
+
import { getResources, handleResourceRead } from "./resources/index.js";
|
|
10
|
+
export async function createServer(client) {
|
|
11
|
+
const server = new Server({
|
|
12
|
+
name: "stickyrice",
|
|
13
|
+
version: "0.1.0",
|
|
14
|
+
}, {
|
|
15
|
+
capabilities: {
|
|
16
|
+
tools: {},
|
|
17
|
+
resources: {},
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
// List available tools
|
|
21
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
22
|
+
return { tools: getTools() };
|
|
23
|
+
});
|
|
24
|
+
// Handle tool calls
|
|
25
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
26
|
+
const { name, arguments: args } = request.params;
|
|
27
|
+
return handleToolCall(client, name, args ?? {});
|
|
28
|
+
});
|
|
29
|
+
// List available resources
|
|
30
|
+
server.setRequestHandler(ListResourcesRequestSchema, async () => {
|
|
31
|
+
return { resources: await getResources(client) };
|
|
32
|
+
});
|
|
33
|
+
// Read resource content
|
|
34
|
+
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
35
|
+
const { uri } = request.params;
|
|
36
|
+
return handleResourceRead(client, uri);
|
|
37
|
+
});
|
|
38
|
+
return server;
|
|
39
|
+
}
|
|
40
|
+
export async function runServer(client) {
|
|
41
|
+
const server = await createServer(client);
|
|
42
|
+
const transport = new StdioServerTransport();
|
|
43
|
+
await server.connect(transport);
|
|
44
|
+
console.error("Sticky Rice MCP server running on stdio");
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,+EAA+E;AAC/E,+EAA+E;AAC/E,mEAAmE;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EA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AAO,CAAC,MAAM,CAAC;QAC/B,OAAO,kBAAkB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,MAAwB;IACtD,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,MAAM,CAAC,CAAC;IAC1C,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { StickyRiceClient } from "../convex-client.js";
|
|
3
|
+
export declare const boardTools: Tool[];
|
|
4
|
+
export declare function handleBoardTool(client: StickyRiceClient, name: string, args: Record<string, unknown>): Promise<unknown>;
|
|
5
|
+
//# sourceMappingURL=boards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boards.d.ts","sourceRoot":"","sources":["../../src/tools/boards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,eAAO,MAAM,UAAU,EAAE,IAAI,EA4G5B,CAAC;AAEF,wBAAsB,eAAe,CACnC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,OAAO,CAAC,CAkDlB"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
export const boardTools = [
|
|
2
|
+
{
|
|
3
|
+
name: "list_boards",
|
|
4
|
+
description: "List all boards for the authenticated user",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: "object",
|
|
7
|
+
properties: {},
|
|
8
|
+
required: [],
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
name: "get_board",
|
|
13
|
+
description: "Get a board with all its columns, notes, and items. Returns the full board structure.",
|
|
14
|
+
inputSchema: {
|
|
15
|
+
type: "object",
|
|
16
|
+
properties: {
|
|
17
|
+
boardId: {
|
|
18
|
+
type: "string",
|
|
19
|
+
description: "The Convex ID of the board",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
required: ["boardId"],
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "create_board",
|
|
27
|
+
description: "Create a new board",
|
|
28
|
+
inputSchema: {
|
|
29
|
+
type: "object",
|
|
30
|
+
properties: {
|
|
31
|
+
title: {
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "The board title",
|
|
34
|
+
},
|
|
35
|
+
order: {
|
|
36
|
+
type: "number",
|
|
37
|
+
description: "Display order (optional, defaults to end of list)",
|
|
38
|
+
},
|
|
39
|
+
workspaceId: {
|
|
40
|
+
type: "string",
|
|
41
|
+
description: "The workspace ID to create the board in (optional, defaults to Personal)",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
required: ["title"],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "update_board",
|
|
49
|
+
description: "Update an existing board",
|
|
50
|
+
inputSchema: {
|
|
51
|
+
type: "object",
|
|
52
|
+
properties: {
|
|
53
|
+
boardId: {
|
|
54
|
+
type: "string",
|
|
55
|
+
description: "The Convex ID of the board to update",
|
|
56
|
+
},
|
|
57
|
+
title: {
|
|
58
|
+
type: "string",
|
|
59
|
+
description: "New title for the board",
|
|
60
|
+
},
|
|
61
|
+
order: {
|
|
62
|
+
type: "number",
|
|
63
|
+
description: "New display order",
|
|
64
|
+
},
|
|
65
|
+
workspaceId: {
|
|
66
|
+
type: "string",
|
|
67
|
+
description: "Move board to workspace (use null to move to Personal)",
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
required: ["boardId"],
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: "delete_board",
|
|
75
|
+
description: "Delete a board and all its columns, notes, and items. This cannot be undone.",
|
|
76
|
+
inputSchema: {
|
|
77
|
+
type: "object",
|
|
78
|
+
properties: {
|
|
79
|
+
boardId: {
|
|
80
|
+
type: "string",
|
|
81
|
+
description: "The Convex ID of the board to delete",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
required: ["boardId"],
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "search_notes",
|
|
89
|
+
description: "Search notes by keyword across all boards",
|
|
90
|
+
inputSchema: {
|
|
91
|
+
type: "object",
|
|
92
|
+
properties: {
|
|
93
|
+
query: {
|
|
94
|
+
type: "string",
|
|
95
|
+
description: "Search query (searches in note titles and item content)",
|
|
96
|
+
},
|
|
97
|
+
limit: {
|
|
98
|
+
type: "number",
|
|
99
|
+
description: "Maximum results to return (default: 20)",
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
required: ["query"],
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
];
|
|
106
|
+
export async function handleBoardTool(client, name, args) {
|
|
107
|
+
switch (name) {
|
|
108
|
+
case "list_boards": {
|
|
109
|
+
return client.query("mcp:listBoards", {});
|
|
110
|
+
}
|
|
111
|
+
case "get_board": {
|
|
112
|
+
const boardId = args.boardId;
|
|
113
|
+
if (!boardId)
|
|
114
|
+
throw new Error("boardId is required");
|
|
115
|
+
return client.query("mcp:getFullBoard", { boardId });
|
|
116
|
+
}
|
|
117
|
+
case "create_board": {
|
|
118
|
+
const title = args.title;
|
|
119
|
+
if (!title)
|
|
120
|
+
throw new Error("title is required");
|
|
121
|
+
const order = args.order;
|
|
122
|
+
const workspaceId = args.workspaceId;
|
|
123
|
+
return client.mutation("mcp:createBoard", { title, order, workspaceId });
|
|
124
|
+
}
|
|
125
|
+
case "update_board": {
|
|
126
|
+
const boardId = args.boardId;
|
|
127
|
+
if (!boardId)
|
|
128
|
+
throw new Error("boardId is required");
|
|
129
|
+
const title = args.title;
|
|
130
|
+
const order = args.order;
|
|
131
|
+
const workspaceId = args.workspaceId;
|
|
132
|
+
return client.mutation("mcp:updateBoard", {
|
|
133
|
+
boardId,
|
|
134
|
+
title,
|
|
135
|
+
order,
|
|
136
|
+
workspaceId,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
case "delete_board": {
|
|
140
|
+
const boardId = args.boardId;
|
|
141
|
+
if (!boardId)
|
|
142
|
+
throw new Error("boardId is required");
|
|
143
|
+
return client.mutation("mcp:deleteBoard", { boardId });
|
|
144
|
+
}
|
|
145
|
+
case "search_notes": {
|
|
146
|
+
const query = args.query;
|
|
147
|
+
if (!query)
|
|
148
|
+
throw new Error("query is required");
|
|
149
|
+
const limit = args.limit ?? 20;
|
|
150
|
+
return client.query("mcp:searchNotes", { query, limit });
|
|
151
|
+
}
|
|
152
|
+
default:
|
|
153
|
+
throw new Error(`Unknown board tool: ${name}`);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=boards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boards.js","sourceRoot":"","sources":["../../src/tools/boards.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,UAAU,GAAW;IAChC;QACE,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,4CAA4C;QACzD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,EAAE;SACb;KACF;IACD;QACE,IAAI,EAAE,WAAW;QACjB,WAAW,EACT,uFAAuF;QACzF,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,IAAI,EAAE,QA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,CAAC;YACvC,IAAI,CAAC,OAAO;gBAAE,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;YACrD,MAAM,KAAK,GAAG,IAAI,CAAC,KAA2B,CAAC;YAC/C,MAAM,KAAK,GAAG,IAAI,CAAC,KAA2B,CAAC;YAC/C,MAAM,WAAW,GAAG,IAAI,CAAC,WAAwC,CAAC;YAClE,OAAO,MAAM,CAAC,QAAQ,CAAC,iBAAiB,EAAE;gBACxC,OAAO;gBACP,KAAK;gBACL,KAAK;gBACL,WAAW;aACZ,CAAC,CAAC;QACL,CAAC;QAED,KAAK,cAAc,CAAC,CAAC,CAAC;YACpB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAiB,CAAC;YACvC,IAAI,CAAC,OAAO;gBAAE,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;YACrD,OAAO,MAAM,CAAC,QAAQ,CAAC,iBAAiB,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;QACzD,CAAC;QAED,KAAK,cAAc,CAAC,CAAC,CAAC;YACpB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAe,CAAC;YACnC,IAAI,CAAC,KAAK;gBAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;YACjD,MAAM,KAAK,GAAI,IAAI,CAAC,KAAgB,IAAI,EAAE,CAAC;YAC3C,OAAO,MAAM,CAAC,KAAK,CAAC,iBAAiB,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;QAC3D,CAAC;QAED;YACE,MAAM,IAAI,KAAK,CAAC,uBAAuB,IAAI,EAAE,CAAC,CAAC;IACnD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { StickyRiceClient } from "../convex-client.js";
|
|
3
|
+
export declare const columnTools: Tool[];
|
|
4
|
+
export declare function handleColumnTool(client: StickyRiceClient, name: string, args: Record<string, unknown>): Promise<unknown>;
|
|
5
|
+
//# sourceMappingURL=columns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"columns.d.ts","sourceRoot":"","sources":["../../src/tools/columns.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,eAAO,MAAM,WAAW,EAAE,IAAI,EAgE7B,CAAC;AAEF,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,OAAO,CAAC,CAkClB"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
export const columnTools = [
|
|
2
|
+
{
|
|
3
|
+
name: "create_column",
|
|
4
|
+
description: "Create a new column in a board",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: "object",
|
|
7
|
+
properties: {
|
|
8
|
+
boardId: {
|
|
9
|
+
type: "string",
|
|
10
|
+
description: "The Convex ID of the board",
|
|
11
|
+
},
|
|
12
|
+
title: {
|
|
13
|
+
type: "string",
|
|
14
|
+
description: "The column title",
|
|
15
|
+
},
|
|
16
|
+
order: {
|
|
17
|
+
type: "number",
|
|
18
|
+
description: "Display order (optional, defaults to end of list)",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
required: ["boardId", "title"],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "update_column",
|
|
26
|
+
description: "Update an existing column",
|
|
27
|
+
inputSchema: {
|
|
28
|
+
type: "object",
|
|
29
|
+
properties: {
|
|
30
|
+
columnId: {
|
|
31
|
+
type: "string",
|
|
32
|
+
description: "The Convex ID of the column to update",
|
|
33
|
+
},
|
|
34
|
+
title: {
|
|
35
|
+
type: "string",
|
|
36
|
+
description: "New title for the column",
|
|
37
|
+
},
|
|
38
|
+
order: {
|
|
39
|
+
type: "number",
|
|
40
|
+
description: "New display order",
|
|
41
|
+
},
|
|
42
|
+
boardId: {
|
|
43
|
+
type: "string",
|
|
44
|
+
description: "Move column to a different board",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
required: ["columnId"],
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "delete_column",
|
|
52
|
+
description: "Delete a column and all its notes and items. This cannot be undone.",
|
|
53
|
+
inputSchema: {
|
|
54
|
+
type: "object",
|
|
55
|
+
properties: {
|
|
56
|
+
columnId: {
|
|
57
|
+
type: "string",
|
|
58
|
+
description: "The Convex ID of the column to delete",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
required: ["columnId"],
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
];
|
|
65
|
+
export async function handleColumnTool(client, name, args) {
|
|
66
|
+
switch (name) {
|
|
67
|
+
case "create_column": {
|
|
68
|
+
const boardId = args.boardId;
|
|
69
|
+
if (!boardId)
|
|
70
|
+
throw new Error("boardId is required");
|
|
71
|
+
const title = args.title;
|
|
72
|
+
if (!title)
|
|
73
|
+
throw new Error("title is required");
|
|
74
|
+
const order = args.order;
|
|
75
|
+
return client.mutation("mcp:createColumn", { boardId, title, order });
|
|
76
|
+
}
|
|
77
|
+
case "update_column": {
|
|
78
|
+
const columnId = args.columnId;
|
|
79
|
+
if (!columnId)
|
|
80
|
+
throw new Error("columnId is required");
|
|
81
|
+
const title = args.title;
|
|
82
|
+
const order = args.order;
|
|
83
|
+
const boardId = args.boardId;
|
|
84
|
+
return client.mutation("mcp:updateColumn", {
|
|
85
|
+
columnId,
|
|
86
|
+
title,
|
|
87
|
+
order,
|
|
88
|
+
boardId,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
case "delete_column": {
|
|
92
|
+
const columnId = args.columnId;
|
|
93
|
+
if (!columnId)
|
|
94
|
+
throw new Error("columnId is required");
|
|
95
|
+
return client.mutation("mcp:deleteColumn", { columnId });
|
|
96
|
+
}
|
|
97
|
+
default:
|
|
98
|
+
throw new Error(`Unknown column tool: ${name}`);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=columns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"columns.js","sourceRoot":"","sources":["../../src/tools/columns.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,WAAW,GAAW;IACjC;QACE,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,gCAAgC;QAC7C,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,4BAA4B;iBAC1C;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,kBAAkB;iBAChC;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,mDAAmD;iBACjE;aACF;YACD,QAAQ,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC;SAC/B;KACF;IACD;QACE,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,2BAA2B;QACxC,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,uCAAuC;iBACrD;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,0BAA0B;iBACxC;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,mBAAmB;iBACjC;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,kCAAkC;iBAChD;aACF;YACD,QAAQ,EAAE,CAAC,UAAU,CAAC;SACvB;KACF;IACD;QACE,IAAI,EAAE,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AC;QAED,KAAK,eAAe,CAAC,CAAC,CAAC;YACrB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAkB,CAAC;YACzC,IAAI,CAAC,QAAQ;gBAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;YACvD,OAAO,MAAM,CAAC,QAAQ,CAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC3D,CAAC;QAED;YACE,MAAM,IAAI,KAAK,CAAC,wBAAwB,IAAI,EAAE,CAAC,CAAC;IACpD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { StickyRiceClient } from "../convex-client.js";
|
|
3
|
+
export declare function getTools(): Tool[];
|
|
4
|
+
export declare function handleToolCall(client: StickyRiceClient, name: string, args: Record<string, unknown>): Promise<{
|
|
5
|
+
content: Array<{
|
|
6
|
+
type: "text";
|
|
7
|
+
text: string;
|
|
8
|
+
}>;
|
|
9
|
+
}>;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAQ5D,wBAAgB,QAAQ,IAAI,IAAI,EAAE,CASjC;AAED,wBAAsB,cAAc,CAClC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAoC7D"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { workspaceTools, handleWorkspaceTool } from "./workspaces.js";
|
|
2
|
+
import { boardTools, handleBoardTool } from "./boards.js";
|
|
3
|
+
import { columnTools, handleColumnTool } from "./columns.js";
|
|
4
|
+
import { noteTools, handleNoteTool } from "./notes.js";
|
|
5
|
+
import { noteItemTools, handleNoteItemTool } from "./note-items.js";
|
|
6
|
+
import { tagTools, handleTagTool } from "./tags.js";
|
|
7
|
+
export function getTools() {
|
|
8
|
+
return [
|
|
9
|
+
...workspaceTools,
|
|
10
|
+
...boardTools,
|
|
11
|
+
...columnTools,
|
|
12
|
+
...noteTools,
|
|
13
|
+
...noteItemTools,
|
|
14
|
+
...tagTools,
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
export async function handleToolCall(client, name, args) {
|
|
18
|
+
try {
|
|
19
|
+
let result;
|
|
20
|
+
// Route to appropriate handler
|
|
21
|
+
if (name.includes("workspace")) {
|
|
22
|
+
result = await handleWorkspaceTool(client, name, args);
|
|
23
|
+
}
|
|
24
|
+
else if (name.includes("board") ||
|
|
25
|
+
name === "search_notes") {
|
|
26
|
+
result = await handleBoardTool(client, name, args);
|
|
27
|
+
}
|
|
28
|
+
else if (name.includes("column")) {
|
|
29
|
+
result = await handleColumnTool(client, name, args);
|
|
30
|
+
}
|
|
31
|
+
else if (name.includes("note") &&
|
|
32
|
+
!name.includes("note_item")) {
|
|
33
|
+
result = await handleNoteTool(client, name, args);
|
|
34
|
+
}
|
|
35
|
+
else if (name.includes("note_item")) {
|
|
36
|
+
result = await handleNoteItemTool(client, name, args);
|
|
37
|
+
}
|
|
38
|
+
else if (name.includes("tag")) {
|
|
39
|
+
result = await handleTagTool(client, name, args);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
50
|
+
return {
|
|
51
|
+
content: [{ type: "text", text: `Error: ${message}` }],
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAEpD,MAAM,UAAU,QAAQ;IACtB,OAAO;QACL,GAAG,cAAc;QACjB,GAAG,UAAU;QACb,GAAG,WAAW;QACd,GAAG,SAAS;QACZ,GAAG,aAAa;QAChB,GAAG,QAAQ;KACZ,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,MAAwB,EACxB,IAAY,EACZ,IAA6B;IAE7B,IAAI,CAAC;QACH,IAAI,MAAe,CAAC;QAEpB,+BAA+B;QAC/B,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;YAC/B,MAAM,GAAG,MAAM,mBAAmB,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QACzD,CAAC;aAAM,IACL,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACtB,IAAI,KAAK,cAAc,EACvB,CAAC;YACD,MAAM,GAAG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AAO,EAAE,EAAE,CAAC;SACvD,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { StickyRiceClient } from "../convex-client.js";
|
|
3
|
+
export declare const noteItemTools: Tool[];
|
|
4
|
+
export declare function handleNoteItemTool(client: StickyRiceClient, name: string, args: Record<string, unknown>): Promise<unknown>;
|
|
5
|
+
//# sourceMappingURL=note-items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"note-items.d.ts","sourceRoot":"","sources":["../../src/tools/note-items.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,eAAO,MAAM,aAAa,EAAE,IAAI,EA6D/B,CAAC;AAEF,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,OAAO,CAAC,CAuClB"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
export const noteItemTools = [
|
|
2
|
+
{
|
|
3
|
+
name: "add_note_item",
|
|
4
|
+
description: "Add a bullet journal item to a note",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: "object",
|
|
7
|
+
properties: {
|
|
8
|
+
noteId: {
|
|
9
|
+
type: "string",
|
|
10
|
+
description: "The Convex ID of the note",
|
|
11
|
+
},
|
|
12
|
+
content: {
|
|
13
|
+
type: "string",
|
|
14
|
+
description: "The text content of the item",
|
|
15
|
+
},
|
|
16
|
+
type: {
|
|
17
|
+
type: "string",
|
|
18
|
+
enum: ["todo", "doing", "todo_done", "event", "event_done", "note", "cancelled"],
|
|
19
|
+
description: "Item type (default: note)",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
required: ["noteId", "content"],
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "update_note_item",
|
|
27
|
+
description: "Update a note item (change content or status)",
|
|
28
|
+
inputSchema: {
|
|
29
|
+
type: "object",
|
|
30
|
+
properties: {
|
|
31
|
+
itemId: {
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "The Convex ID of the item",
|
|
34
|
+
},
|
|
35
|
+
content: {
|
|
36
|
+
type: "string",
|
|
37
|
+
description: "New text content",
|
|
38
|
+
},
|
|
39
|
+
type: {
|
|
40
|
+
type: "string",
|
|
41
|
+
enum: ["todo", "doing", "todo_done", "event", "event_done", "note", "cancelled"],
|
|
42
|
+
description: "New item type/status",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
required: ["itemId"],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "delete_note_item",
|
|
50
|
+
description: "Delete a note item",
|
|
51
|
+
inputSchema: {
|
|
52
|
+
type: "object",
|
|
53
|
+
properties: {
|
|
54
|
+
itemId: {
|
|
55
|
+
type: "string",
|
|
56
|
+
description: "The Convex ID of the item to delete",
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
required: ["itemId"],
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
export async function handleNoteItemTool(client, name, args) {
|
|
64
|
+
switch (name) {
|
|
65
|
+
case "add_note_item": {
|
|
66
|
+
const noteId = args.noteId;
|
|
67
|
+
const content = args.content;
|
|
68
|
+
const type = args.type ?? "note";
|
|
69
|
+
if (!noteId || !content) {
|
|
70
|
+
throw new Error("noteId and content are required");
|
|
71
|
+
}
|
|
72
|
+
return client.mutation("mcp:createNoteItem", {
|
|
73
|
+
noteId,
|
|
74
|
+
content,
|
|
75
|
+
type,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
case "update_note_item": {
|
|
79
|
+
const itemId = args.itemId;
|
|
80
|
+
if (!itemId)
|
|
81
|
+
throw new Error("itemId is required");
|
|
82
|
+
const updates = { itemId };
|
|
83
|
+
if (args.content !== undefined)
|
|
84
|
+
updates.content = args.content;
|
|
85
|
+
if (args.type !== undefined)
|
|
86
|
+
updates.type = args.type;
|
|
87
|
+
return client.mutation("mcp:updateNoteItem", updates);
|
|
88
|
+
}
|
|
89
|
+
case "delete_note_item": {
|
|
90
|
+
const itemId = args.itemId;
|
|
91
|
+
if (!itemId)
|
|
92
|
+
throw new Error("itemId is required");
|
|
93
|
+
return client.mutation("mcp:deleteNoteItem", { itemId });
|
|
94
|
+
}
|
|
95
|
+
default:
|
|
96
|
+
throw new Error(`Unknown note item tool: ${name}`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=note-items.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"note-items.js","sourceRoot":"","sources":["../../src/tools/note-items.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,aAAa,GAAW;IACnC;QACE,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,qCAAqC;QAClD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,2BAA2B;iBACzC;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,8BAA8B;iBAC5C;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,CAAC;oBAChF,WAAW,EAAE,2BAA2B;iBACzC;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;SAChC;KACF;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,+CAA+C;Q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CAAC;QACL,CAAC;QAED,KAAK,kBAAkB,CAAC,CAAC,CAAC;YACxB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAgB,CAAC;YACrC,IAAI,CAAC,MAAM;gBAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;YAEnD,MAAM,OAAO,GAA4B,EAAE,MAAM,EAAE,CAAC;YACpD,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS;gBAAE,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;YAC/D,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS;gBAAE,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;YAEtD,OAAO,MAAM,CAAC,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;QACxD,CAAC;QAED,KAAK,kBAAkB,CAAC,CAAC,CAAC;YACxB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAgB,CAAC;YACrC,IAAI,CAAC,MAAM;gBAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;YAEnD,OAAO,MAAM,CAAC,QAAQ,CAAC,oBAAoB,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;QAC3D,CAAC;QAED;YACE,MAAM,IAAI,KAAK,CAAC,2BAA2B,IAAI,EAAE,CAAC,CAAC;IACvD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { StickyRiceClient } from "../convex-client.js";
|
|
3
|
+
export declare const noteTools: Tool[];
|
|
4
|
+
export declare function handleNoteTool(client: StickyRiceClient, name: string, args: Record<string, unknown>): Promise<unknown>;
|
|
5
|
+
//# sourceMappingURL=notes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notes.d.ts","sourceRoot":"","sources":["../../src/tools/notes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,eAAO,MAAM,SAAS,EAAE,IAAI,EAgK3B,CAAC;AAEF,wBAAsB,cAAc,CAClC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,OAAO,CAAC,CA4DlB"}
|