@intangle/mcp-server 1.0.8 → 1.0.10
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/dist/index.js +60 -88
- package/index.ts +65 -97
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ if (!MCP_API_KEY) {
|
|
|
22
22
|
console.log("Intangle MCP Server starting - connecting to", API_BASE_URL);
|
|
23
23
|
// Version checking
|
|
24
24
|
// IMPORTANT: Update BOTH package.json version AND this constant when bumping version
|
|
25
|
-
const CURRENT_VERSION = "1.0.
|
|
25
|
+
const CURRENT_VERSION = "1.0.10";
|
|
26
26
|
let latestVersion = null;
|
|
27
27
|
let versionCheckDone = false;
|
|
28
28
|
async function checkVersion() {
|
|
@@ -75,7 +75,7 @@ const server = new Server({
|
|
|
75
75
|
const TOOLS = [
|
|
76
76
|
{
|
|
77
77
|
name: "add_memory",
|
|
78
|
-
description: "Store
|
|
78
|
+
description: "Store CONTEXT (general information and knowledge) in the user's memory system. For actionable workflow items with status tracking, use add_task instead. Accepts a single context item or an array of context items for batch creation. REQUIRES space_id parameter.",
|
|
79
79
|
inputSchema: {
|
|
80
80
|
type: "object",
|
|
81
81
|
properties: {
|
|
@@ -135,18 +135,13 @@ const TOOLS = [
|
|
|
135
135
|
},
|
|
136
136
|
{
|
|
137
137
|
name: "search_memories",
|
|
138
|
-
description: "Search through stored
|
|
138
|
+
description: "Search through ALL stored data including BOTH context (general information) AND tasks (actionable workflow items). Uses advanced hybrid search (semantic + text + entity relationships). When a user asks to 'update memory' or 'check memory', this tool searches BOTH types. ALWAYS provide space_id parameter - this is mandatory for all searches.",
|
|
139
139
|
inputSchema: {
|
|
140
140
|
type: "object",
|
|
141
141
|
properties: {
|
|
142
142
|
space_id: {
|
|
143
143
|
type: "string",
|
|
144
|
-
description: "REQUIRED
|
|
145
|
-
},
|
|
146
|
-
space_ids: {
|
|
147
|
-
type: "array",
|
|
148
|
-
items: { type: "string" },
|
|
149
|
-
description: "REQUIRED (or use space_id): Multiple spaces to search across",
|
|
144
|
+
description: "REQUIRED: Space to search in (use list_spaces to see available options)",
|
|
150
145
|
},
|
|
151
146
|
query: {
|
|
152
147
|
type: "string",
|
|
@@ -168,7 +163,7 @@ const TOOLS = [
|
|
|
168
163
|
},
|
|
169
164
|
{
|
|
170
165
|
name: "get_recent_memories",
|
|
171
|
-
description: "Get the most recent
|
|
166
|
+
description: "Get the most recent CONTEXT items (general information). For recent tasks, use list_tasks instead. NOTE: This tool is called 'get_recent_memories' (not 'fetch'). Returns fully decrypted data. REQUIRES space_id parameter.",
|
|
172
167
|
inputSchema: {
|
|
173
168
|
type: "object",
|
|
174
169
|
properties: {
|
|
@@ -192,57 +187,44 @@ const TOOLS = [
|
|
|
192
187
|
},
|
|
193
188
|
{
|
|
194
189
|
name: "get_entities",
|
|
195
|
-
description: "Get extracted entities (people, places, concepts) from
|
|
190
|
+
description: "Get extracted entities (people, places, concepts) from CONTEXT items (general information). If no memory_id provided, returns top 20 most frequently mentioned entities across all context. WARNING: This tool can return large responses - use sparingly and only when entity information is specifically needed.",
|
|
196
191
|
inputSchema: {
|
|
197
192
|
type: "object",
|
|
198
193
|
properties: {
|
|
199
194
|
memory_id: {
|
|
200
195
|
type: "string",
|
|
201
|
-
description: "
|
|
196
|
+
description: "Memory ID to get entities for. RECOMMENDED: Always provide memory_id to get focused results.",
|
|
202
197
|
},
|
|
203
198
|
},
|
|
204
199
|
},
|
|
205
200
|
},
|
|
206
201
|
{
|
|
207
202
|
name: "delete_memory",
|
|
208
|
-
description: "Delete a
|
|
209
|
-
inputSchema: {
|
|
210
|
-
type: "object",
|
|
211
|
-
properties: {
|
|
212
|
-
memory_id: {
|
|
213
|
-
type: "string",
|
|
214
|
-
description: "ID of the memory to delete",
|
|
215
|
-
},
|
|
216
|
-
},
|
|
217
|
-
required: ["memory_id"],
|
|
218
|
-
},
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
name: "batch_delete_memories",
|
|
222
|
-
description: "Delete multiple memories in a single transaction. All-or-nothing operation.",
|
|
203
|
+
description: "Delete one or more CONTEXT items (general information). For deleting tasks, use delete_task instead. Accepts a single memory ID or an array of memory IDs for batch deletion.",
|
|
223
204
|
inputSchema: {
|
|
224
205
|
type: "object",
|
|
225
206
|
properties: {
|
|
226
207
|
memory_ids: {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
208
|
+
oneOf: [
|
|
209
|
+
{
|
|
210
|
+
type: "string",
|
|
211
|
+
description: "Single memory ID to delete",
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
type: "array",
|
|
215
|
+
items: { type: "string" },
|
|
216
|
+
description: "Array of memory IDs to delete",
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
description: "Single memory ID or array of memory IDs to delete",
|
|
230
220
|
},
|
|
231
221
|
},
|
|
232
222
|
required: ["memory_ids"],
|
|
233
223
|
},
|
|
234
224
|
},
|
|
235
|
-
{
|
|
236
|
-
name: "debug_memory_structure",
|
|
237
|
-
description: "Debug tool to inspect the current memory structure in the database",
|
|
238
|
-
inputSchema: {
|
|
239
|
-
type: "object",
|
|
240
|
-
properties: {},
|
|
241
|
-
},
|
|
242
|
-
},
|
|
243
225
|
{
|
|
244
226
|
name: "list_spaces",
|
|
245
|
-
description: "Get all available spaces with their descriptions and
|
|
227
|
+
description: "Get all available spaces with their descriptions and item counts (both context and tasks). Spaces are top-level containers that isolate different contexts (e.g., personal, work, projects).",
|
|
246
228
|
inputSchema: {
|
|
247
229
|
type: "object",
|
|
248
230
|
properties: {},
|
|
@@ -250,7 +232,7 @@ const TOOLS = [
|
|
|
250
232
|
},
|
|
251
233
|
{
|
|
252
234
|
name: "create_space",
|
|
253
|
-
description: "Create a new space with optional startup configuration. The 'start' tool loads this configuration when beginning work in this space. Checks user's plan limits and returns upgrade link if limit reached.",
|
|
235
|
+
description: "Create a new space with optional startup configuration. Spaces are top-level containers that hold both context (general information) and tasks (actionable items). The 'start' tool loads this configuration when beginning work in this space. Checks user's plan limits and returns upgrade link if limit reached.",
|
|
254
236
|
inputSchema: {
|
|
255
237
|
type: "object",
|
|
256
238
|
properties: {
|
|
@@ -260,7 +242,7 @@ const TOOLS = [
|
|
|
260
242
|
},
|
|
261
243
|
description: {
|
|
262
244
|
type: "string",
|
|
263
|
-
description: "Brief description of what this space is for (e.g., 'Work-related
|
|
245
|
+
description: "Brief description of what this space is for (e.g., 'Work-related context and tasks')",
|
|
264
246
|
},
|
|
265
247
|
startup_context: {
|
|
266
248
|
type: "string",
|
|
@@ -295,7 +277,7 @@ const TOOLS = [
|
|
|
295
277
|
},
|
|
296
278
|
{
|
|
297
279
|
name: "start",
|
|
298
|
-
description: "Start working in a space and get
|
|
280
|
+
description: "Start working in a space and get comprehensive initialization. Returns static context, auto-searched context (general information), preferences, and optionally pending tasks. This tool retrieves BOTH context AND tasks based on space configuration. Call this when starting a conversation in a space to get relevant information.",
|
|
299
281
|
inputSchema: {
|
|
300
282
|
type: "object",
|
|
301
283
|
properties: {
|
|
@@ -309,7 +291,7 @@ const TOOLS = [
|
|
|
309
291
|
},
|
|
310
292
|
{
|
|
311
293
|
name: "add_task",
|
|
312
|
-
description: "Create one or more tasks in your space with status tracking. Accepts a single task object or an array of task objects for batch creation. Tasks have graph relationships like memories (entities, topics, temporal). REQUIRES space_id parameter.",
|
|
294
|
+
description: "Create one or more tasks in your space with status tracking and priority levels. Accepts a single task object or an array of task objects for batch creation. Tasks have graph relationships like memories (entities, topics, temporal). REQUIRES space_id parameter.",
|
|
313
295
|
inputSchema: {
|
|
314
296
|
type: "object",
|
|
315
297
|
properties: {
|
|
@@ -341,6 +323,12 @@ const TOOLS = [
|
|
|
341
323
|
description: "Task status (default: pending)",
|
|
342
324
|
default: "pending",
|
|
343
325
|
},
|
|
326
|
+
priority: {
|
|
327
|
+
type: "string",
|
|
328
|
+
enum: ["urgent", "high", "medium", "low"],
|
|
329
|
+
description: "Task priority level (default: medium). Use 'urgent' for time-sensitive tasks requiring immediate attention, 'high' for important tasks, 'medium' for standard tasks, 'low' for nice-to-have tasks.",
|
|
330
|
+
default: "medium",
|
|
331
|
+
},
|
|
344
332
|
parent_id: {
|
|
345
333
|
type: "string",
|
|
346
334
|
description: "Optional parent task ID to create this as a subtask",
|
|
@@ -372,6 +360,12 @@ const TOOLS = [
|
|
|
372
360
|
description: "Task status (default: pending)",
|
|
373
361
|
default: "pending",
|
|
374
362
|
},
|
|
363
|
+
priority: {
|
|
364
|
+
type: "string",
|
|
365
|
+
enum: ["urgent", "high", "medium", "low"],
|
|
366
|
+
description: "Task priority level (default: medium). Use 'urgent' for time-sensitive tasks requiring immediate attention, 'high' for important tasks, 'medium' for standard tasks, 'low' for nice-to-have tasks.",
|
|
367
|
+
default: "medium",
|
|
368
|
+
},
|
|
375
369
|
parent_id: {
|
|
376
370
|
type: "string",
|
|
377
371
|
description: "Optional parent task ID to create this as a subtask",
|
|
@@ -408,7 +402,7 @@ const TOOLS = [
|
|
|
408
402
|
},
|
|
409
403
|
{
|
|
410
404
|
name: "update_task",
|
|
411
|
-
description: "Update one or more
|
|
405
|
+
description: "Update one or more TASKS (not context/memories - use add_memory to update context by creating new versions). Accepts a single update object or an array of update objects for batch updates. Each update must include task_id.",
|
|
412
406
|
inputSchema: {
|
|
413
407
|
type: "object",
|
|
414
408
|
properties: {
|
|
@@ -501,28 +495,23 @@ const TOOLS = [
|
|
|
501
495
|
},
|
|
502
496
|
{
|
|
503
497
|
name: "delete_task",
|
|
504
|
-
description: "Delete a task
|
|
505
|
-
inputSchema: {
|
|
506
|
-
type: "object",
|
|
507
|
-
properties: {
|
|
508
|
-
task_id: {
|
|
509
|
-
type: "string",
|
|
510
|
-
description: "ID of task to delete",
|
|
511
|
-
},
|
|
512
|
-
},
|
|
513
|
-
required: ["task_id"],
|
|
514
|
-
},
|
|
515
|
-
},
|
|
516
|
-
{
|
|
517
|
-
name: "batch_delete_tasks",
|
|
518
|
-
description: "Delete multiple tasks in a single transaction. All-or-nothing operation.",
|
|
498
|
+
description: "Delete one or more tasks in a single transaction. Accepts a single task ID or an array of task IDs for batch deletion.",
|
|
519
499
|
inputSchema: {
|
|
520
500
|
type: "object",
|
|
521
501
|
properties: {
|
|
522
502
|
task_ids: {
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
503
|
+
oneOf: [
|
|
504
|
+
{
|
|
505
|
+
type: "string",
|
|
506
|
+
description: "Single task ID to delete",
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
type: "array",
|
|
510
|
+
items: { type: "string" },
|
|
511
|
+
description: "Array of task IDs to delete",
|
|
512
|
+
},
|
|
513
|
+
],
|
|
514
|
+
description: "Single task ID or array of task IDs to delete",
|
|
526
515
|
},
|
|
527
516
|
},
|
|
528
517
|
required: ["task_ids"],
|
|
@@ -547,14 +536,14 @@ async function handleAddMemory(args) {
|
|
|
547
536
|
});
|
|
548
537
|
}
|
|
549
538
|
async function handleSearchMemories(args) {
|
|
550
|
-
const { space_id,
|
|
551
|
-
// Require
|
|
552
|
-
if (!space_id
|
|
553
|
-
throw new Error("
|
|
539
|
+
const { space_id, query, topics, max_results = 10, } = args;
|
|
540
|
+
// Require space_id
|
|
541
|
+
if (!space_id) {
|
|
542
|
+
throw new Error("space_id is required. Use list_spaces to see available options.");
|
|
554
543
|
}
|
|
555
544
|
return makeApiCall("search-memories", {
|
|
556
545
|
space_id,
|
|
557
|
-
space_ids,
|
|
546
|
+
space_ids: [space_id], // Convert to array for backend compatibility
|
|
558
547
|
query,
|
|
559
548
|
topics,
|
|
560
549
|
max_results,
|
|
@@ -577,11 +566,8 @@ async function handleGetEntities(args) {
|
|
|
577
566
|
return makeApiCall("get-entities", { memory_id });
|
|
578
567
|
}
|
|
579
568
|
async function handleDeleteMemory(args) {
|
|
580
|
-
const {
|
|
581
|
-
return makeApiCall("delete-memory", {
|
|
582
|
-
}
|
|
583
|
-
async function handleDebugStructure() {
|
|
584
|
-
return makeApiCall("debug-structure", {});
|
|
569
|
+
const { memory_ids } = args;
|
|
570
|
+
return makeApiCall("delete-memory", { memory_ids });
|
|
585
571
|
}
|
|
586
572
|
async function handleListSpaces() {
|
|
587
573
|
return makeApiCall("list-spaces", {});
|
|
@@ -626,13 +612,8 @@ async function handleListTasks(args) {
|
|
|
626
612
|
return makeApiCall("list-tasks", args);
|
|
627
613
|
}
|
|
628
614
|
async function handleDeleteTask(args) {
|
|
629
|
-
|
|
630
|
-
}
|
|
631
|
-
async function handleBatchDeleteMemories(args) {
|
|
632
|
-
return makeApiCall("batch-delete-memories", args);
|
|
633
|
-
}
|
|
634
|
-
async function handleBatchDeleteTasks(args) {
|
|
635
|
-
return makeApiCall("batch-delete-tasks", args);
|
|
615
|
+
const { task_ids } = args;
|
|
616
|
+
return makeApiCall("delete-task", { task_ids });
|
|
636
617
|
}
|
|
637
618
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
638
619
|
const { name, arguments: args } = request.params;
|
|
@@ -654,9 +635,6 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
654
635
|
case "delete_memory":
|
|
655
636
|
result = await handleDeleteMemory(args);
|
|
656
637
|
break;
|
|
657
|
-
case "debug_memory_structure":
|
|
658
|
-
result = await handleDebugStructure();
|
|
659
|
-
break;
|
|
660
638
|
case "list_spaces":
|
|
661
639
|
result = await handleListSpaces();
|
|
662
640
|
break;
|
|
@@ -684,12 +662,6 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
684
662
|
case "delete_task":
|
|
685
663
|
result = await handleDeleteTask(args);
|
|
686
664
|
break;
|
|
687
|
-
case "batch_delete_memories":
|
|
688
|
-
result = await handleBatchDeleteMemories(args);
|
|
689
|
-
break;
|
|
690
|
-
case "batch_delete_tasks":
|
|
691
|
-
result = await handleBatchDeleteTasks(args);
|
|
692
|
-
break;
|
|
693
665
|
default:
|
|
694
666
|
throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
695
667
|
}
|
package/index.ts
CHANGED
|
@@ -35,7 +35,7 @@ console.log("Intangle MCP Server starting - connecting to", API_BASE_URL);
|
|
|
35
35
|
|
|
36
36
|
// Version checking
|
|
37
37
|
// IMPORTANT: Update BOTH package.json version AND this constant when bumping version
|
|
38
|
-
const CURRENT_VERSION = "1.0.
|
|
38
|
+
const CURRENT_VERSION = "1.0.10";
|
|
39
39
|
let latestVersion: string | null = null;
|
|
40
40
|
let versionCheckDone = false;
|
|
41
41
|
|
|
@@ -100,7 +100,7 @@ const TOOLS = [
|
|
|
100
100
|
{
|
|
101
101
|
name: "add_memory",
|
|
102
102
|
description:
|
|
103
|
-
"Store
|
|
103
|
+
"Store CONTEXT (general information and knowledge) in the user's memory system. For actionable workflow items with status tracking, use add_task instead. Accepts a single context item or an array of context items for batch creation. REQUIRES space_id parameter.",
|
|
104
104
|
inputSchema: {
|
|
105
105
|
type: "object",
|
|
106
106
|
properties: {
|
|
@@ -164,20 +164,14 @@ const TOOLS = [
|
|
|
164
164
|
{
|
|
165
165
|
name: "search_memories",
|
|
166
166
|
description:
|
|
167
|
-
"Search through stored
|
|
167
|
+
"Search through ALL stored data including BOTH context (general information) AND tasks (actionable workflow items). Uses advanced hybrid search (semantic + text + entity relationships). When a user asks to 'update memory' or 'check memory', this tool searches BOTH types. ALWAYS provide space_id parameter - this is mandatory for all searches.",
|
|
168
168
|
inputSchema: {
|
|
169
169
|
type: "object",
|
|
170
170
|
properties: {
|
|
171
171
|
space_id: {
|
|
172
172
|
type: "string",
|
|
173
173
|
description:
|
|
174
|
-
"REQUIRED
|
|
175
|
-
},
|
|
176
|
-
space_ids: {
|
|
177
|
-
type: "array",
|
|
178
|
-
items: { type: "string" },
|
|
179
|
-
description:
|
|
180
|
-
"REQUIRED (or use space_id): Multiple spaces to search across",
|
|
174
|
+
"REQUIRED: Space to search in (use list_spaces to see available options)",
|
|
181
175
|
},
|
|
182
176
|
query: {
|
|
183
177
|
type: "string",
|
|
@@ -200,7 +194,7 @@ const TOOLS = [
|
|
|
200
194
|
{
|
|
201
195
|
name: "get_recent_memories",
|
|
202
196
|
description:
|
|
203
|
-
"Get the most recent
|
|
197
|
+
"Get the most recent CONTEXT items (general information). For recent tasks, use list_tasks instead. NOTE: This tool is called 'get_recent_memories' (not 'fetch'). Returns fully decrypted data. REQUIRES space_id parameter.",
|
|
204
198
|
inputSchema: {
|
|
205
199
|
type: "object",
|
|
206
200
|
properties: {
|
|
@@ -226,60 +220,45 @@ const TOOLS = [
|
|
|
226
220
|
{
|
|
227
221
|
name: "get_entities",
|
|
228
222
|
description:
|
|
229
|
-
"Get extracted entities (people, places, concepts) from
|
|
223
|
+
"Get extracted entities (people, places, concepts) from CONTEXT items (general information). If no memory_id provided, returns top 20 most frequently mentioned entities across all context. WARNING: This tool can return large responses - use sparingly and only when entity information is specifically needed.",
|
|
230
224
|
inputSchema: {
|
|
231
225
|
type: "object",
|
|
232
226
|
properties: {
|
|
233
227
|
memory_id: {
|
|
234
228
|
type: "string",
|
|
235
|
-
description: "
|
|
229
|
+
description: "Memory ID to get entities for. RECOMMENDED: Always provide memory_id to get focused results.",
|
|
236
230
|
},
|
|
237
231
|
},
|
|
238
232
|
},
|
|
239
233
|
},
|
|
240
234
|
{
|
|
241
235
|
name: "delete_memory",
|
|
242
|
-
description: "Delete a
|
|
243
|
-
inputSchema: {
|
|
244
|
-
type: "object",
|
|
245
|
-
properties: {
|
|
246
|
-
memory_id: {
|
|
247
|
-
type: "string",
|
|
248
|
-
description: "ID of the memory to delete",
|
|
249
|
-
},
|
|
250
|
-
},
|
|
251
|
-
required: ["memory_id"],
|
|
252
|
-
},
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
name: "batch_delete_memories",
|
|
256
|
-
description:
|
|
257
|
-
"Delete multiple memories in a single transaction. All-or-nothing operation.",
|
|
236
|
+
description: "Delete one or more CONTEXT items (general information). For deleting tasks, use delete_task instead. Accepts a single memory ID or an array of memory IDs for batch deletion.",
|
|
258
237
|
inputSchema: {
|
|
259
238
|
type: "object",
|
|
260
239
|
properties: {
|
|
261
240
|
memory_ids: {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
241
|
+
oneOf: [
|
|
242
|
+
{
|
|
243
|
+
type: "string",
|
|
244
|
+
description: "Single memory ID to delete",
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
type: "array",
|
|
248
|
+
items: { type: "string" },
|
|
249
|
+
description: "Array of memory IDs to delete",
|
|
250
|
+
},
|
|
251
|
+
],
|
|
252
|
+
description: "Single memory ID or array of memory IDs to delete",
|
|
265
253
|
},
|
|
266
254
|
},
|
|
267
255
|
required: ["memory_ids"],
|
|
268
256
|
},
|
|
269
257
|
},
|
|
270
|
-
{
|
|
271
|
-
name: "debug_memory_structure",
|
|
272
|
-
description:
|
|
273
|
-
"Debug tool to inspect the current memory structure in the database",
|
|
274
|
-
inputSchema: {
|
|
275
|
-
type: "object",
|
|
276
|
-
properties: {},
|
|
277
|
-
},
|
|
278
|
-
},
|
|
279
258
|
{
|
|
280
259
|
name: "list_spaces",
|
|
281
260
|
description:
|
|
282
|
-
"Get all available spaces with their descriptions and
|
|
261
|
+
"Get all available spaces with their descriptions and item counts (both context and tasks). Spaces are top-level containers that isolate different contexts (e.g., personal, work, projects).",
|
|
283
262
|
inputSchema: {
|
|
284
263
|
type: "object",
|
|
285
264
|
properties: {},
|
|
@@ -288,7 +267,7 @@ const TOOLS = [
|
|
|
288
267
|
{
|
|
289
268
|
name: "create_space",
|
|
290
269
|
description:
|
|
291
|
-
"Create a new space with optional startup configuration. The 'start' tool loads this configuration when beginning work in this space. Checks user's plan limits and returns upgrade link if limit reached.",
|
|
270
|
+
"Create a new space with optional startup configuration. Spaces are top-level containers that hold both context (general information) and tasks (actionable items). The 'start' tool loads this configuration when beginning work in this space. Checks user's plan limits and returns upgrade link if limit reached.",
|
|
292
271
|
inputSchema: {
|
|
293
272
|
type: "object",
|
|
294
273
|
properties: {
|
|
@@ -298,7 +277,7 @@ const TOOLS = [
|
|
|
298
277
|
},
|
|
299
278
|
description: {
|
|
300
279
|
type: "string",
|
|
301
|
-
description: "Brief description of what this space is for (e.g., 'Work-related
|
|
280
|
+
description: "Brief description of what this space is for (e.g., 'Work-related context and tasks')",
|
|
302
281
|
},
|
|
303
282
|
startup_context: {
|
|
304
283
|
type: "string",
|
|
@@ -334,7 +313,7 @@ const TOOLS = [
|
|
|
334
313
|
{
|
|
335
314
|
name: "start",
|
|
336
315
|
description:
|
|
337
|
-
"Start working in a space and get
|
|
316
|
+
"Start working in a space and get comprehensive initialization. Returns static context, auto-searched context (general information), preferences, and optionally pending tasks. This tool retrieves BOTH context AND tasks based on space configuration. Call this when starting a conversation in a space to get relevant information.",
|
|
338
317
|
inputSchema: {
|
|
339
318
|
type: "object",
|
|
340
319
|
properties: {
|
|
@@ -349,7 +328,7 @@ const TOOLS = [
|
|
|
349
328
|
{
|
|
350
329
|
name: "add_task",
|
|
351
330
|
description:
|
|
352
|
-
"Create one or more tasks in your space with status tracking. Accepts a single task object or an array of task objects for batch creation. Tasks have graph relationships like memories (entities, topics, temporal). REQUIRES space_id parameter.",
|
|
331
|
+
"Create one or more tasks in your space with status tracking and priority levels. Accepts a single task object or an array of task objects for batch creation. Tasks have graph relationships like memories (entities, topics, temporal). REQUIRES space_id parameter.",
|
|
353
332
|
inputSchema: {
|
|
354
333
|
type: "object",
|
|
355
334
|
properties: {
|
|
@@ -382,6 +361,13 @@ const TOOLS = [
|
|
|
382
361
|
description: "Task status (default: pending)",
|
|
383
362
|
default: "pending",
|
|
384
363
|
},
|
|
364
|
+
priority: {
|
|
365
|
+
type: "string",
|
|
366
|
+
enum: ["urgent", "high", "medium", "low"],
|
|
367
|
+
description:
|
|
368
|
+
"Task priority level (default: medium). Use 'urgent' for time-sensitive tasks requiring immediate attention, 'high' for important tasks, 'medium' for standard tasks, 'low' for nice-to-have tasks.",
|
|
369
|
+
default: "medium",
|
|
370
|
+
},
|
|
385
371
|
parent_id: {
|
|
386
372
|
type: "string",
|
|
387
373
|
description: "Optional parent task ID to create this as a subtask",
|
|
@@ -413,6 +399,13 @@ const TOOLS = [
|
|
|
413
399
|
description: "Task status (default: pending)",
|
|
414
400
|
default: "pending",
|
|
415
401
|
},
|
|
402
|
+
priority: {
|
|
403
|
+
type: "string",
|
|
404
|
+
enum: ["urgent", "high", "medium", "low"],
|
|
405
|
+
description:
|
|
406
|
+
"Task priority level (default: medium). Use 'urgent' for time-sensitive tasks requiring immediate attention, 'high' for important tasks, 'medium' for standard tasks, 'low' for nice-to-have tasks.",
|
|
407
|
+
default: "medium",
|
|
408
|
+
},
|
|
416
409
|
parent_id: {
|
|
417
410
|
type: "string",
|
|
418
411
|
description: "Optional parent task ID to create this as a subtask",
|
|
@@ -449,7 +442,7 @@ const TOOLS = [
|
|
|
449
442
|
},
|
|
450
443
|
{
|
|
451
444
|
name: "update_task",
|
|
452
|
-
description: "Update one or more
|
|
445
|
+
description: "Update one or more TASKS (not context/memories - use add_memory to update context by creating new versions). Accepts a single update object or an array of update objects for batch updates. Each update must include task_id.",
|
|
453
446
|
inputSchema: {
|
|
454
447
|
type: "object",
|
|
455
448
|
properties: {
|
|
@@ -542,29 +535,23 @@ const TOOLS = [
|
|
|
542
535
|
},
|
|
543
536
|
{
|
|
544
537
|
name: "delete_task",
|
|
545
|
-
description: "Delete a task
|
|
546
|
-
inputSchema: {
|
|
547
|
-
type: "object",
|
|
548
|
-
properties: {
|
|
549
|
-
task_id: {
|
|
550
|
-
type: "string",
|
|
551
|
-
description: "ID of task to delete",
|
|
552
|
-
},
|
|
553
|
-
},
|
|
554
|
-
required: ["task_id"],
|
|
555
|
-
},
|
|
556
|
-
},
|
|
557
|
-
{
|
|
558
|
-
name: "batch_delete_tasks",
|
|
559
|
-
description:
|
|
560
|
-
"Delete multiple tasks in a single transaction. All-or-nothing operation.",
|
|
538
|
+
description: "Delete one or more tasks in a single transaction. Accepts a single task ID or an array of task IDs for batch deletion.",
|
|
561
539
|
inputSchema: {
|
|
562
540
|
type: "object",
|
|
563
541
|
properties: {
|
|
564
542
|
task_ids: {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
543
|
+
oneOf: [
|
|
544
|
+
{
|
|
545
|
+
type: "string",
|
|
546
|
+
description: "Single task ID to delete",
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
type: "array",
|
|
550
|
+
items: { type: "string" },
|
|
551
|
+
description: "Array of task IDs to delete",
|
|
552
|
+
},
|
|
553
|
+
],
|
|
554
|
+
description: "Single task ID or array of task IDs to delete",
|
|
568
555
|
},
|
|
569
556
|
},
|
|
570
557
|
required: ["task_ids"],
|
|
@@ -598,28 +585,26 @@ async function handleAddMemory(args: any) {
|
|
|
598
585
|
async function handleSearchMemories(args: any) {
|
|
599
586
|
const {
|
|
600
587
|
space_id,
|
|
601
|
-
space_ids,
|
|
602
588
|
query,
|
|
603
589
|
topics,
|
|
604
590
|
max_results = 10,
|
|
605
591
|
} = args as {
|
|
606
|
-
space_id
|
|
607
|
-
space_ids?: string[];
|
|
592
|
+
space_id: string;
|
|
608
593
|
query: string;
|
|
609
594
|
topics?: string[];
|
|
610
595
|
max_results?: number;
|
|
611
596
|
};
|
|
612
597
|
|
|
613
|
-
// Require
|
|
614
|
-
if (!space_id
|
|
598
|
+
// Require space_id
|
|
599
|
+
if (!space_id) {
|
|
615
600
|
throw new Error(
|
|
616
|
-
"
|
|
601
|
+
"space_id is required. Use list_spaces to see available options.",
|
|
617
602
|
);
|
|
618
603
|
}
|
|
619
604
|
|
|
620
605
|
return makeApiCall("search-memories", {
|
|
621
606
|
space_id,
|
|
622
|
-
space_ids,
|
|
607
|
+
space_ids: [space_id], // Convert to array for backend compatibility
|
|
623
608
|
query,
|
|
624
609
|
topics,
|
|
625
610
|
max_results,
|
|
@@ -658,15 +643,11 @@ async function handleGetEntities(args: any) {
|
|
|
658
643
|
}
|
|
659
644
|
|
|
660
645
|
async function handleDeleteMemory(args: any) {
|
|
661
|
-
const {
|
|
662
|
-
|
|
646
|
+
const { memory_ids } = args as {
|
|
647
|
+
memory_ids: string | string[];
|
|
663
648
|
};
|
|
664
649
|
|
|
665
|
-
return makeApiCall("delete-memory", {
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
async function handleDebugStructure() {
|
|
669
|
-
return makeApiCall("debug-structure", {});
|
|
650
|
+
return makeApiCall("delete-memory", { memory_ids });
|
|
670
651
|
}
|
|
671
652
|
|
|
672
653
|
async function handleListSpaces() {
|
|
@@ -725,15 +706,11 @@ async function handleListTasks(args: any) {
|
|
|
725
706
|
}
|
|
726
707
|
|
|
727
708
|
async function handleDeleteTask(args: any) {
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
async function handleBatchDeleteMemories(args: any) {
|
|
732
|
-
return makeApiCall("batch-delete-memories", args);
|
|
733
|
-
}
|
|
709
|
+
const { task_ids } = args as {
|
|
710
|
+
task_ids: string | string[];
|
|
711
|
+
};
|
|
734
712
|
|
|
735
|
-
|
|
736
|
-
return makeApiCall("batch-delete-tasks", args);
|
|
713
|
+
return makeApiCall("delete-task", { task_ids });
|
|
737
714
|
}
|
|
738
715
|
|
|
739
716
|
server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
|
|
@@ -758,9 +735,6 @@ server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
|
|
|
758
735
|
case "delete_memory":
|
|
759
736
|
result = await handleDeleteMemory(args);
|
|
760
737
|
break;
|
|
761
|
-
case "debug_memory_structure":
|
|
762
|
-
result = await handleDebugStructure();
|
|
763
|
-
break;
|
|
764
738
|
case "list_spaces":
|
|
765
739
|
result = await handleListSpaces();
|
|
766
740
|
break;
|
|
@@ -788,12 +762,6 @@ server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
|
|
|
788
762
|
case "delete_task":
|
|
789
763
|
result = await handleDeleteTask(args);
|
|
790
764
|
break;
|
|
791
|
-
case "batch_delete_memories":
|
|
792
|
-
result = await handleBatchDeleteMemories(args);
|
|
793
|
-
break;
|
|
794
|
-
case "batch_delete_tasks":
|
|
795
|
-
result = await handleBatchDeleteTasks(args);
|
|
796
|
-
break;
|
|
797
765
|
default:
|
|
798
766
|
throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
799
767
|
}
|