@intangle/mcp-server 1.0.6 → 1.0.8
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 +279 -68
- package/index.ts +292 -69
- 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.8";
|
|
26
26
|
let latestVersion = null;
|
|
27
27
|
let versionCheckDone = false;
|
|
28
28
|
async function checkVersion() {
|
|
@@ -75,29 +75,62 @@ const server = new Server({
|
|
|
75
75
|
const TOOLS = [
|
|
76
76
|
{
|
|
77
77
|
name: "add_memory",
|
|
78
|
-
description: "Store
|
|
78
|
+
description: "Store one or more memories in the user's memory graph with flexible topics. Accepts a single memory object or an array of memory objects for batch creation. REQUIRES space_id parameter.",
|
|
79
79
|
inputSchema: {
|
|
80
80
|
type: "object",
|
|
81
81
|
properties: {
|
|
82
82
|
space_id: {
|
|
83
83
|
type: "string",
|
|
84
|
-
description: "REQUIRED: Space to store memory in (use list_spaces to see available options)",
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
84
|
+
description: "REQUIRED: Space to store memory/memories in (use list_spaces to see available options)",
|
|
85
|
+
},
|
|
86
|
+
memories: {
|
|
87
|
+
oneOf: [
|
|
88
|
+
{
|
|
89
|
+
type: "object",
|
|
90
|
+
properties: {
|
|
91
|
+
title: {
|
|
92
|
+
type: "string",
|
|
93
|
+
description: "Title/summary of the memory",
|
|
94
|
+
},
|
|
95
|
+
content: {
|
|
96
|
+
type: "string",
|
|
97
|
+
description: "Detailed content of the memory",
|
|
98
|
+
},
|
|
99
|
+
topics: {
|
|
100
|
+
type: "array",
|
|
101
|
+
items: { type: "string" },
|
|
102
|
+
description: "Flexible topics/tags for organization (e.g., ['coding', 'react'])",
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
required: ["title", "content"],
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
type: "array",
|
|
109
|
+
items: {
|
|
110
|
+
type: "object",
|
|
111
|
+
properties: {
|
|
112
|
+
title: {
|
|
113
|
+
type: "string",
|
|
114
|
+
description: "Title/summary of the memory",
|
|
115
|
+
},
|
|
116
|
+
content: {
|
|
117
|
+
type: "string",
|
|
118
|
+
description: "Detailed content of the memory",
|
|
119
|
+
},
|
|
120
|
+
topics: {
|
|
121
|
+
type: "array",
|
|
122
|
+
items: { type: "string" },
|
|
123
|
+
description: "Flexible topics/tags for organization (e.g., ['coding', 'react'])",
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
required: ["title", "content"],
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
description: "Single memory object or array of memory objects to create",
|
|
98
131
|
},
|
|
99
132
|
},
|
|
100
|
-
required: ["space_id", "
|
|
133
|
+
required: ["space_id", "memories"],
|
|
101
134
|
},
|
|
102
135
|
},
|
|
103
136
|
{
|
|
@@ -184,6 +217,21 @@ const TOOLS = [
|
|
|
184
217
|
required: ["memory_id"],
|
|
185
218
|
},
|
|
186
219
|
},
|
|
220
|
+
{
|
|
221
|
+
name: "batch_delete_memories",
|
|
222
|
+
description: "Delete multiple memories in a single transaction. All-or-nothing operation.",
|
|
223
|
+
inputSchema: {
|
|
224
|
+
type: "object",
|
|
225
|
+
properties: {
|
|
226
|
+
memory_ids: {
|
|
227
|
+
type: "array",
|
|
228
|
+
items: { type: "string" },
|
|
229
|
+
description: "Array of memory IDs to delete",
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
required: ["memory_ids"],
|
|
233
|
+
},
|
|
234
|
+
},
|
|
187
235
|
{
|
|
188
236
|
name: "debug_memory_structure",
|
|
189
237
|
description: "Debug tool to inspect the current memory structure in the database",
|
|
@@ -200,6 +248,37 @@ const TOOLS = [
|
|
|
200
248
|
properties: {},
|
|
201
249
|
},
|
|
202
250
|
},
|
|
251
|
+
{
|
|
252
|
+
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.",
|
|
254
|
+
inputSchema: {
|
|
255
|
+
type: "object",
|
|
256
|
+
properties: {
|
|
257
|
+
name: {
|
|
258
|
+
type: "string",
|
|
259
|
+
description: "Name for the space (e.g., 'Work', 'Personal', 'Project X')",
|
|
260
|
+
},
|
|
261
|
+
description: {
|
|
262
|
+
type: "string",
|
|
263
|
+
description: "Brief description of what this space is for (e.g., 'Work-related memories and tasks')",
|
|
264
|
+
},
|
|
265
|
+
startup_context: {
|
|
266
|
+
type: "string",
|
|
267
|
+
description: "Context and keywords provided to AI when starting this space. Include role, preferences, common tasks, and relevant search terms. This helps the AI understand what information to prioritize from memory.",
|
|
268
|
+
},
|
|
269
|
+
startup_preferences: {
|
|
270
|
+
type: "string",
|
|
271
|
+
description: "AI behavior preferences for this space. Guides how the AI should interact and respond when working in this context (e.g., 'Be concise and technical', 'Focus on creative solutions').",
|
|
272
|
+
},
|
|
273
|
+
include_tasks: {
|
|
274
|
+
type: "boolean",
|
|
275
|
+
description: "Whether to automatically retrieve pending/in-progress tasks when running the 'start' tool for this space",
|
|
276
|
+
default: false,
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
required: ["name"],
|
|
280
|
+
},
|
|
281
|
+
},
|
|
203
282
|
{
|
|
204
283
|
name: "get_space_info",
|
|
205
284
|
description: "Get detailed information about a specific space",
|
|
@@ -230,39 +309,82 @@ const TOOLS = [
|
|
|
230
309
|
},
|
|
231
310
|
{
|
|
232
311
|
name: "add_task",
|
|
233
|
-
description: "Create
|
|
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.",
|
|
234
313
|
inputSchema: {
|
|
235
314
|
type: "object",
|
|
236
315
|
properties: {
|
|
237
316
|
space_id: {
|
|
238
317
|
type: "string",
|
|
239
|
-
description: "REQUIRED: Space to create task in (use list_spaces to see available options)",
|
|
240
|
-
},
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
318
|
+
description: "REQUIRED: Space to create task/tasks in (use list_spaces to see available options)",
|
|
319
|
+
},
|
|
320
|
+
tasks: {
|
|
321
|
+
oneOf: [
|
|
322
|
+
{
|
|
323
|
+
type: "object",
|
|
324
|
+
properties: {
|
|
325
|
+
title: {
|
|
326
|
+
type: "string",
|
|
327
|
+
description: "Task title/summary",
|
|
328
|
+
},
|
|
329
|
+
content: {
|
|
330
|
+
type: "string",
|
|
331
|
+
description: "Detailed task description",
|
|
332
|
+
},
|
|
333
|
+
topics: {
|
|
334
|
+
type: "array",
|
|
335
|
+
items: { type: "string" },
|
|
336
|
+
description: "Optional topics/tags for organization",
|
|
337
|
+
},
|
|
338
|
+
status: {
|
|
339
|
+
type: "string",
|
|
340
|
+
enum: ["pending", "in_progress", "completed", "invalidated"],
|
|
341
|
+
description: "Task status (default: pending)",
|
|
342
|
+
default: "pending",
|
|
343
|
+
},
|
|
344
|
+
parent_id: {
|
|
345
|
+
type: "string",
|
|
346
|
+
description: "Optional parent task ID to create this as a subtask",
|
|
347
|
+
},
|
|
348
|
+
},
|
|
349
|
+
required: ["title", "content"],
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
type: "array",
|
|
353
|
+
items: {
|
|
354
|
+
type: "object",
|
|
355
|
+
properties: {
|
|
356
|
+
title: {
|
|
357
|
+
type: "string",
|
|
358
|
+
description: "Task title/summary",
|
|
359
|
+
},
|
|
360
|
+
content: {
|
|
361
|
+
type: "string",
|
|
362
|
+
description: "Detailed task description",
|
|
363
|
+
},
|
|
364
|
+
topics: {
|
|
365
|
+
type: "array",
|
|
366
|
+
items: { type: "string" },
|
|
367
|
+
description: "Optional topics/tags for organization",
|
|
368
|
+
},
|
|
369
|
+
status: {
|
|
370
|
+
type: "string",
|
|
371
|
+
enum: ["pending", "in_progress", "completed", "invalidated"],
|
|
372
|
+
description: "Task status (default: pending)",
|
|
373
|
+
default: "pending",
|
|
374
|
+
},
|
|
375
|
+
parent_id: {
|
|
376
|
+
type: "string",
|
|
377
|
+
description: "Optional parent task ID to create this as a subtask",
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
required: ["title", "content"],
|
|
381
|
+
},
|
|
382
|
+
},
|
|
383
|
+
],
|
|
384
|
+
description: "Single task object or array of task objects to create",
|
|
263
385
|
},
|
|
264
386
|
},
|
|
265
|
-
required: ["space_id", "
|
|
387
|
+
required: ["space_id", "tasks"],
|
|
266
388
|
},
|
|
267
389
|
},
|
|
268
390
|
{
|
|
@@ -286,29 +408,66 @@ const TOOLS = [
|
|
|
286
408
|
},
|
|
287
409
|
{
|
|
288
410
|
name: "update_task",
|
|
289
|
-
description: "Update
|
|
411
|
+
description: "Update one or more tasks. Accepts a single update object or an array of update objects for batch updates. Each update must include task_id.",
|
|
290
412
|
inputSchema: {
|
|
291
413
|
type: "object",
|
|
292
414
|
properties: {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
415
|
+
updates: {
|
|
416
|
+
oneOf: [
|
|
417
|
+
{
|
|
418
|
+
type: "object",
|
|
419
|
+
properties: {
|
|
420
|
+
task_id: {
|
|
421
|
+
type: "string",
|
|
422
|
+
description: "Task ID to update",
|
|
423
|
+
},
|
|
424
|
+
title: {
|
|
425
|
+
type: "string",
|
|
426
|
+
description: "New title (optional)",
|
|
427
|
+
},
|
|
428
|
+
content: {
|
|
429
|
+
type: "string",
|
|
430
|
+
description: "New content (optional)",
|
|
431
|
+
},
|
|
432
|
+
topics: {
|
|
433
|
+
type: "array",
|
|
434
|
+
items: { type: "string" },
|
|
435
|
+
description: "New topics array (optional)",
|
|
436
|
+
},
|
|
437
|
+
},
|
|
438
|
+
required: ["task_id"],
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
type: "array",
|
|
442
|
+
items: {
|
|
443
|
+
type: "object",
|
|
444
|
+
properties: {
|
|
445
|
+
task_id: {
|
|
446
|
+
type: "string",
|
|
447
|
+
description: "Task ID to update",
|
|
448
|
+
},
|
|
449
|
+
title: {
|
|
450
|
+
type: "string",
|
|
451
|
+
description: "New title (optional)",
|
|
452
|
+
},
|
|
453
|
+
content: {
|
|
454
|
+
type: "string",
|
|
455
|
+
description: "New content (optional)",
|
|
456
|
+
},
|
|
457
|
+
topics: {
|
|
458
|
+
type: "array",
|
|
459
|
+
items: { type: "string" },
|
|
460
|
+
description: "New topics array (optional)",
|
|
461
|
+
},
|
|
462
|
+
},
|
|
463
|
+
required: ["task_id"],
|
|
464
|
+
},
|
|
465
|
+
},
|
|
466
|
+
],
|
|
467
|
+
description: "Single update object or array of update objects",
|
|
309
468
|
},
|
|
310
469
|
},
|
|
311
|
-
required: ["
|
|
470
|
+
required: ["updates"],
|
|
312
471
|
},
|
|
313
472
|
},
|
|
314
473
|
{
|
|
@@ -354,6 +513,21 @@ const TOOLS = [
|
|
|
354
513
|
required: ["task_id"],
|
|
355
514
|
},
|
|
356
515
|
},
|
|
516
|
+
{
|
|
517
|
+
name: "batch_delete_tasks",
|
|
518
|
+
description: "Delete multiple tasks in a single transaction. All-or-nothing operation.",
|
|
519
|
+
inputSchema: {
|
|
520
|
+
type: "object",
|
|
521
|
+
properties: {
|
|
522
|
+
task_ids: {
|
|
523
|
+
type: "array",
|
|
524
|
+
items: { type: "string" },
|
|
525
|
+
description: "Array of task IDs to delete",
|
|
526
|
+
},
|
|
527
|
+
},
|
|
528
|
+
required: ["task_ids"],
|
|
529
|
+
},
|
|
530
|
+
},
|
|
357
531
|
];
|
|
358
532
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
359
533
|
tools: TOOLS,
|
|
@@ -363,11 +537,14 @@ async function handleAddMemory(args) {
|
|
|
363
537
|
if (!args.space_id) {
|
|
364
538
|
throw new Error("space_id is required. Use list_spaces to see available options.");
|
|
365
539
|
}
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
return makeApiCall("add-memory",
|
|
540
|
+
if (!args.memories) {
|
|
541
|
+
throw new Error("memories parameter is required (single object or array)");
|
|
542
|
+
}
|
|
543
|
+
// Pass through to API
|
|
544
|
+
return makeApiCall("add-memory", {
|
|
545
|
+
space_id: args.space_id,
|
|
546
|
+
memories: args.memories,
|
|
547
|
+
});
|
|
371
548
|
}
|
|
372
549
|
async function handleSearchMemories(args) {
|
|
373
550
|
const { space_id, space_ids, query, topics, max_results = 10, } = args;
|
|
@@ -409,6 +586,9 @@ async function handleDebugStructure() {
|
|
|
409
586
|
async function handleListSpaces() {
|
|
410
587
|
return makeApiCall("list-spaces", {});
|
|
411
588
|
}
|
|
589
|
+
async function handleCreateSpace(args) {
|
|
590
|
+
return makeApiCall("create-space", args);
|
|
591
|
+
}
|
|
412
592
|
async function handleGetSpaceInfo(args) {
|
|
413
593
|
const { space_id } = args;
|
|
414
594
|
return makeApiCall("get-space-info", { space_id });
|
|
@@ -418,13 +598,29 @@ async function handleStart(args) {
|
|
|
418
598
|
return makeApiCall("start", { space_id });
|
|
419
599
|
}
|
|
420
600
|
async function handleAddTask(args) {
|
|
421
|
-
|
|
601
|
+
if (!args.space_id) {
|
|
602
|
+
throw new Error("space_id is required. Use list_spaces to see available options.");
|
|
603
|
+
}
|
|
604
|
+
if (!args.tasks) {
|
|
605
|
+
throw new Error("tasks parameter is required (single object or array)");
|
|
606
|
+
}
|
|
607
|
+
// Pass through to API
|
|
608
|
+
return makeApiCall("add-task", {
|
|
609
|
+
space_id: args.space_id,
|
|
610
|
+
tasks: args.tasks,
|
|
611
|
+
});
|
|
422
612
|
}
|
|
423
613
|
async function handleUpdateTaskStatus(args) {
|
|
424
614
|
return makeApiCall("update-task-status", args);
|
|
425
615
|
}
|
|
426
616
|
async function handleUpdateTask(args) {
|
|
427
|
-
|
|
617
|
+
if (!args.updates) {
|
|
618
|
+
throw new Error("updates parameter is required (single object or array)");
|
|
619
|
+
}
|
|
620
|
+
// Pass through to API
|
|
621
|
+
return makeApiCall("update-task", {
|
|
622
|
+
updates: args.updates,
|
|
623
|
+
});
|
|
428
624
|
}
|
|
429
625
|
async function handleListTasks(args) {
|
|
430
626
|
return makeApiCall("list-tasks", args);
|
|
@@ -432,6 +628,12 @@ async function handleListTasks(args) {
|
|
|
432
628
|
async function handleDeleteTask(args) {
|
|
433
629
|
return makeApiCall("delete-task", args);
|
|
434
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);
|
|
636
|
+
}
|
|
435
637
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
436
638
|
const { name, arguments: args } = request.params;
|
|
437
639
|
try {
|
|
@@ -458,6 +660,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
458
660
|
case "list_spaces":
|
|
459
661
|
result = await handleListSpaces();
|
|
460
662
|
break;
|
|
663
|
+
case "create_space":
|
|
664
|
+
result = await handleCreateSpace(args);
|
|
665
|
+
break;
|
|
461
666
|
case "get_space_info":
|
|
462
667
|
result = await handleGetSpaceInfo(args);
|
|
463
668
|
break;
|
|
@@ -479,6 +684,12 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
479
684
|
case "delete_task":
|
|
480
685
|
result = await handleDeleteTask(args);
|
|
481
686
|
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;
|
|
482
693
|
default:
|
|
483
694
|
throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
484
695
|
}
|
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.8";
|
|
39
39
|
let latestVersion: string | null = null;
|
|
40
40
|
let versionCheckDone = false;
|
|
41
41
|
|
|
@@ -100,31 +100,65 @@ const TOOLS = [
|
|
|
100
100
|
{
|
|
101
101
|
name: "add_memory",
|
|
102
102
|
description:
|
|
103
|
-
"Store
|
|
103
|
+
"Store one or more memories in the user's memory graph with flexible topics. Accepts a single memory object or an array of memory objects for batch creation. REQUIRES space_id parameter.",
|
|
104
104
|
inputSchema: {
|
|
105
105
|
type: "object",
|
|
106
106
|
properties: {
|
|
107
107
|
space_id: {
|
|
108
108
|
type: "string",
|
|
109
109
|
description:
|
|
110
|
-
"REQUIRED: Space to store memory in (use list_spaces to see available options)",
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
110
|
+
"REQUIRED: Space to store memory/memories in (use list_spaces to see available options)",
|
|
111
|
+
},
|
|
112
|
+
memories: {
|
|
113
|
+
oneOf: [
|
|
114
|
+
{
|
|
115
|
+
type: "object",
|
|
116
|
+
properties: {
|
|
117
|
+
title: {
|
|
118
|
+
type: "string",
|
|
119
|
+
description: "Title/summary of the memory",
|
|
120
|
+
},
|
|
121
|
+
content: {
|
|
122
|
+
type: "string",
|
|
123
|
+
description: "Detailed content of the memory",
|
|
124
|
+
},
|
|
125
|
+
topics: {
|
|
126
|
+
type: "array",
|
|
127
|
+
items: { type: "string" },
|
|
128
|
+
description:
|
|
129
|
+
"Flexible topics/tags for organization (e.g., ['coding', 'react'])",
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
required: ["title", "content"],
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
type: "array",
|
|
136
|
+
items: {
|
|
137
|
+
type: "object",
|
|
138
|
+
properties: {
|
|
139
|
+
title: {
|
|
140
|
+
type: "string",
|
|
141
|
+
description: "Title/summary of the memory",
|
|
142
|
+
},
|
|
143
|
+
content: {
|
|
144
|
+
type: "string",
|
|
145
|
+
description: "Detailed content of the memory",
|
|
146
|
+
},
|
|
147
|
+
topics: {
|
|
148
|
+
type: "array",
|
|
149
|
+
items: { type: "string" },
|
|
150
|
+
description:
|
|
151
|
+
"Flexible topics/tags for organization (e.g., ['coding', 'react'])",
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
required: ["title", "content"],
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
description: "Single memory object or array of memory objects to create",
|
|
125
159
|
},
|
|
126
160
|
},
|
|
127
|
-
required: ["space_id", "
|
|
161
|
+
required: ["space_id", "memories"],
|
|
128
162
|
},
|
|
129
163
|
},
|
|
130
164
|
{
|
|
@@ -217,6 +251,22 @@ const TOOLS = [
|
|
|
217
251
|
required: ["memory_id"],
|
|
218
252
|
},
|
|
219
253
|
},
|
|
254
|
+
{
|
|
255
|
+
name: "batch_delete_memories",
|
|
256
|
+
description:
|
|
257
|
+
"Delete multiple memories in a single transaction. All-or-nothing operation.",
|
|
258
|
+
inputSchema: {
|
|
259
|
+
type: "object",
|
|
260
|
+
properties: {
|
|
261
|
+
memory_ids: {
|
|
262
|
+
type: "array",
|
|
263
|
+
items: { type: "string" },
|
|
264
|
+
description: "Array of memory IDs to delete",
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
required: ["memory_ids"],
|
|
268
|
+
},
|
|
269
|
+
},
|
|
220
270
|
{
|
|
221
271
|
name: "debug_memory_structure",
|
|
222
272
|
description:
|
|
@@ -235,6 +285,38 @@ const TOOLS = [
|
|
|
235
285
|
properties: {},
|
|
236
286
|
},
|
|
237
287
|
},
|
|
288
|
+
{
|
|
289
|
+
name: "create_space",
|
|
290
|
+
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.",
|
|
292
|
+
inputSchema: {
|
|
293
|
+
type: "object",
|
|
294
|
+
properties: {
|
|
295
|
+
name: {
|
|
296
|
+
type: "string",
|
|
297
|
+
description: "Name for the space (e.g., 'Work', 'Personal', 'Project X')",
|
|
298
|
+
},
|
|
299
|
+
description: {
|
|
300
|
+
type: "string",
|
|
301
|
+
description: "Brief description of what this space is for (e.g., 'Work-related memories and tasks')",
|
|
302
|
+
},
|
|
303
|
+
startup_context: {
|
|
304
|
+
type: "string",
|
|
305
|
+
description: "Context and keywords provided to AI when starting this space. Include role, preferences, common tasks, and relevant search terms. This helps the AI understand what information to prioritize from memory.",
|
|
306
|
+
},
|
|
307
|
+
startup_preferences: {
|
|
308
|
+
type: "string",
|
|
309
|
+
description: "AI behavior preferences for this space. Guides how the AI should interact and respond when working in this context (e.g., 'Be concise and technical', 'Focus on creative solutions').",
|
|
310
|
+
},
|
|
311
|
+
include_tasks: {
|
|
312
|
+
type: "boolean",
|
|
313
|
+
description: "Whether to automatically retrieve pending/in-progress tasks when running the 'start' tool for this space",
|
|
314
|
+
default: false,
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
required: ["name"],
|
|
318
|
+
},
|
|
319
|
+
},
|
|
238
320
|
{
|
|
239
321
|
name: "get_space_info",
|
|
240
322
|
description: "Get detailed information about a specific space",
|
|
@@ -267,40 +349,83 @@ const TOOLS = [
|
|
|
267
349
|
{
|
|
268
350
|
name: "add_task",
|
|
269
351
|
description:
|
|
270
|
-
"Create
|
|
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.",
|
|
271
353
|
inputSchema: {
|
|
272
354
|
type: "object",
|
|
273
355
|
properties: {
|
|
274
356
|
space_id: {
|
|
275
357
|
type: "string",
|
|
276
358
|
description:
|
|
277
|
-
"REQUIRED: Space to create task in (use list_spaces to see available options)",
|
|
278
|
-
},
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
359
|
+
"REQUIRED: Space to create task/tasks in (use list_spaces to see available options)",
|
|
360
|
+
},
|
|
361
|
+
tasks: {
|
|
362
|
+
oneOf: [
|
|
363
|
+
{
|
|
364
|
+
type: "object",
|
|
365
|
+
properties: {
|
|
366
|
+
title: {
|
|
367
|
+
type: "string",
|
|
368
|
+
description: "Task title/summary",
|
|
369
|
+
},
|
|
370
|
+
content: {
|
|
371
|
+
type: "string",
|
|
372
|
+
description: "Detailed task description",
|
|
373
|
+
},
|
|
374
|
+
topics: {
|
|
375
|
+
type: "array",
|
|
376
|
+
items: { type: "string" },
|
|
377
|
+
description: "Optional topics/tags for organization",
|
|
378
|
+
},
|
|
379
|
+
status: {
|
|
380
|
+
type: "string",
|
|
381
|
+
enum: ["pending", "in_progress", "completed", "invalidated"],
|
|
382
|
+
description: "Task status (default: pending)",
|
|
383
|
+
default: "pending",
|
|
384
|
+
},
|
|
385
|
+
parent_id: {
|
|
386
|
+
type: "string",
|
|
387
|
+
description: "Optional parent task ID to create this as a subtask",
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
required: ["title", "content"],
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
type: "array",
|
|
394
|
+
items: {
|
|
395
|
+
type: "object",
|
|
396
|
+
properties: {
|
|
397
|
+
title: {
|
|
398
|
+
type: "string",
|
|
399
|
+
description: "Task title/summary",
|
|
400
|
+
},
|
|
401
|
+
content: {
|
|
402
|
+
type: "string",
|
|
403
|
+
description: "Detailed task description",
|
|
404
|
+
},
|
|
405
|
+
topics: {
|
|
406
|
+
type: "array",
|
|
407
|
+
items: { type: "string" },
|
|
408
|
+
description: "Optional topics/tags for organization",
|
|
409
|
+
},
|
|
410
|
+
status: {
|
|
411
|
+
type: "string",
|
|
412
|
+
enum: ["pending", "in_progress", "completed", "invalidated"],
|
|
413
|
+
description: "Task status (default: pending)",
|
|
414
|
+
default: "pending",
|
|
415
|
+
},
|
|
416
|
+
parent_id: {
|
|
417
|
+
type: "string",
|
|
418
|
+
description: "Optional parent task ID to create this as a subtask",
|
|
419
|
+
},
|
|
420
|
+
},
|
|
421
|
+
required: ["title", "content"],
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
],
|
|
425
|
+
description: "Single task object or array of task objects to create",
|
|
301
426
|
},
|
|
302
427
|
},
|
|
303
|
-
required: ["space_id", "
|
|
428
|
+
required: ["space_id", "tasks"],
|
|
304
429
|
},
|
|
305
430
|
},
|
|
306
431
|
{
|
|
@@ -324,29 +449,66 @@ const TOOLS = [
|
|
|
324
449
|
},
|
|
325
450
|
{
|
|
326
451
|
name: "update_task",
|
|
327
|
-
description: "Update
|
|
452
|
+
description: "Update one or more tasks. Accepts a single update object or an array of update objects for batch updates. Each update must include task_id.",
|
|
328
453
|
inputSchema: {
|
|
329
454
|
type: "object",
|
|
330
455
|
properties: {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
456
|
+
updates: {
|
|
457
|
+
oneOf: [
|
|
458
|
+
{
|
|
459
|
+
type: "object",
|
|
460
|
+
properties: {
|
|
461
|
+
task_id: {
|
|
462
|
+
type: "string",
|
|
463
|
+
description: "Task ID to update",
|
|
464
|
+
},
|
|
465
|
+
title: {
|
|
466
|
+
type: "string",
|
|
467
|
+
description: "New title (optional)",
|
|
468
|
+
},
|
|
469
|
+
content: {
|
|
470
|
+
type: "string",
|
|
471
|
+
description: "New content (optional)",
|
|
472
|
+
},
|
|
473
|
+
topics: {
|
|
474
|
+
type: "array",
|
|
475
|
+
items: { type: "string" },
|
|
476
|
+
description: "New topics array (optional)",
|
|
477
|
+
},
|
|
478
|
+
},
|
|
479
|
+
required: ["task_id"],
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
type: "array",
|
|
483
|
+
items: {
|
|
484
|
+
type: "object",
|
|
485
|
+
properties: {
|
|
486
|
+
task_id: {
|
|
487
|
+
type: "string",
|
|
488
|
+
description: "Task ID to update",
|
|
489
|
+
},
|
|
490
|
+
title: {
|
|
491
|
+
type: "string",
|
|
492
|
+
description: "New title (optional)",
|
|
493
|
+
},
|
|
494
|
+
content: {
|
|
495
|
+
type: "string",
|
|
496
|
+
description: "New content (optional)",
|
|
497
|
+
},
|
|
498
|
+
topics: {
|
|
499
|
+
type: "array",
|
|
500
|
+
items: { type: "string" },
|
|
501
|
+
description: "New topics array (optional)",
|
|
502
|
+
},
|
|
503
|
+
},
|
|
504
|
+
required: ["task_id"],
|
|
505
|
+
},
|
|
506
|
+
},
|
|
507
|
+
],
|
|
508
|
+
description: "Single update object or array of update objects",
|
|
347
509
|
},
|
|
348
510
|
},
|
|
349
|
-
required: ["
|
|
511
|
+
required: ["updates"],
|
|
350
512
|
},
|
|
351
513
|
},
|
|
352
514
|
{
|
|
@@ -392,6 +554,22 @@ const TOOLS = [
|
|
|
392
554
|
required: ["task_id"],
|
|
393
555
|
},
|
|
394
556
|
},
|
|
557
|
+
{
|
|
558
|
+
name: "batch_delete_tasks",
|
|
559
|
+
description:
|
|
560
|
+
"Delete multiple tasks in a single transaction. All-or-nothing operation.",
|
|
561
|
+
inputSchema: {
|
|
562
|
+
type: "object",
|
|
563
|
+
properties: {
|
|
564
|
+
task_ids: {
|
|
565
|
+
type: "array",
|
|
566
|
+
items: { type: "string" },
|
|
567
|
+
description: "Array of task IDs to delete",
|
|
568
|
+
},
|
|
569
|
+
},
|
|
570
|
+
required: ["task_ids"],
|
|
571
|
+
},
|
|
572
|
+
},
|
|
395
573
|
];
|
|
396
574
|
|
|
397
575
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
@@ -406,11 +584,15 @@ async function handleAddMemory(args: any) {
|
|
|
406
584
|
);
|
|
407
585
|
}
|
|
408
586
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
587
|
+
if (!args.memories) {
|
|
588
|
+
throw new Error("memories parameter is required (single object or array)");
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
// Pass through to API
|
|
592
|
+
return makeApiCall("add-memory", {
|
|
593
|
+
space_id: args.space_id,
|
|
594
|
+
memories: args.memories,
|
|
595
|
+
});
|
|
414
596
|
}
|
|
415
597
|
|
|
416
598
|
async function handleSearchMemories(args: any) {
|
|
@@ -491,6 +673,10 @@ async function handleListSpaces() {
|
|
|
491
673
|
return makeApiCall("list-spaces", {});
|
|
492
674
|
}
|
|
493
675
|
|
|
676
|
+
async function handleCreateSpace(args: any) {
|
|
677
|
+
return makeApiCall("create-space", args);
|
|
678
|
+
}
|
|
679
|
+
|
|
494
680
|
async function handleGetSpaceInfo(args: any) {
|
|
495
681
|
const { space_id } = args as { space_id: string };
|
|
496
682
|
return makeApiCall("get-space-info", { space_id });
|
|
@@ -502,7 +688,21 @@ async function handleStart(args: any) {
|
|
|
502
688
|
}
|
|
503
689
|
|
|
504
690
|
async function handleAddTask(args: any) {
|
|
505
|
-
|
|
691
|
+
if (!args.space_id) {
|
|
692
|
+
throw new Error(
|
|
693
|
+
"space_id is required. Use list_spaces to see available options.",
|
|
694
|
+
);
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
if (!args.tasks) {
|
|
698
|
+
throw new Error("tasks parameter is required (single object or array)");
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
// Pass through to API
|
|
702
|
+
return makeApiCall("add-task", {
|
|
703
|
+
space_id: args.space_id,
|
|
704
|
+
tasks: args.tasks,
|
|
705
|
+
});
|
|
506
706
|
}
|
|
507
707
|
|
|
508
708
|
async function handleUpdateTaskStatus(args: any) {
|
|
@@ -510,7 +710,14 @@ async function handleUpdateTaskStatus(args: any) {
|
|
|
510
710
|
}
|
|
511
711
|
|
|
512
712
|
async function handleUpdateTask(args: any) {
|
|
513
|
-
|
|
713
|
+
if (!args.updates) {
|
|
714
|
+
throw new Error("updates parameter is required (single object or array)");
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
// Pass through to API
|
|
718
|
+
return makeApiCall("update-task", {
|
|
719
|
+
updates: args.updates,
|
|
720
|
+
});
|
|
514
721
|
}
|
|
515
722
|
|
|
516
723
|
async function handleListTasks(args: any) {
|
|
@@ -521,6 +728,13 @@ async function handleDeleteTask(args: any) {
|
|
|
521
728
|
return makeApiCall("delete-task", args);
|
|
522
729
|
}
|
|
523
730
|
|
|
731
|
+
async function handleBatchDeleteMemories(args: any) {
|
|
732
|
+
return makeApiCall("batch-delete-memories", args);
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
async function handleBatchDeleteTasks(args: any) {
|
|
736
|
+
return makeApiCall("batch-delete-tasks", args);
|
|
737
|
+
}
|
|
524
738
|
|
|
525
739
|
server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
|
|
526
740
|
const { name, arguments: args } = request.params;
|
|
@@ -550,6 +764,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
|
|
|
550
764
|
case "list_spaces":
|
|
551
765
|
result = await handleListSpaces();
|
|
552
766
|
break;
|
|
767
|
+
case "create_space":
|
|
768
|
+
result = await handleCreateSpace(args);
|
|
769
|
+
break;
|
|
553
770
|
case "get_space_info":
|
|
554
771
|
result = await handleGetSpaceInfo(args);
|
|
555
772
|
break;
|
|
@@ -571,6 +788,12 @@ server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
|
|
|
571
788
|
case "delete_task":
|
|
572
789
|
result = await handleDeleteTask(args);
|
|
573
790
|
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;
|
|
574
797
|
default:
|
|
575
798
|
throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
576
799
|
}
|