@intangle/mcp-server 1.1.6 → 1.1.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 +16 -460
- package/index.ts +18 -501
- package/package.json +51 -50
package/dist/index.js
CHANGED
|
@@ -78,66 +78,6 @@ const server = new Server({
|
|
|
78
78
|
},
|
|
79
79
|
});
|
|
80
80
|
const TOOLS = [
|
|
81
|
-
{
|
|
82
|
-
name: "add_memory",
|
|
83
|
-
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.",
|
|
84
|
-
inputSchema: {
|
|
85
|
-
type: "object",
|
|
86
|
-
properties: {
|
|
87
|
-
space_id: {
|
|
88
|
-
type: "string",
|
|
89
|
-
description: "REQUIRED: Space to store memory/memories in (use list_spaces to see available options)",
|
|
90
|
-
},
|
|
91
|
-
memories: {
|
|
92
|
-
oneOf: [
|
|
93
|
-
{
|
|
94
|
-
type: "object",
|
|
95
|
-
properties: {
|
|
96
|
-
title: {
|
|
97
|
-
type: "string",
|
|
98
|
-
description: "Title/summary of the memory",
|
|
99
|
-
},
|
|
100
|
-
content: {
|
|
101
|
-
type: "string",
|
|
102
|
-
description: "Detailed content of the memory",
|
|
103
|
-
},
|
|
104
|
-
topics: {
|
|
105
|
-
type: "array",
|
|
106
|
-
items: { type: "string" },
|
|
107
|
-
description: "Flexible topics/tags for organization (e.g., ['coding', 'react'])",
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
required: ["title", "content"],
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
type: "array",
|
|
114
|
-
items: {
|
|
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: "Flexible topics/tags for organization (e.g., ['coding', 'react'])",
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
required: ["title", "content"],
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
],
|
|
135
|
-
description: "Single memory object or array of memory objects to create",
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
required: ["space_id", "memories"],
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
81
|
{
|
|
142
82
|
name: "search_memories",
|
|
143
83
|
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.",
|
|
@@ -208,46 +148,6 @@ const TOOLS = [
|
|
|
208
148
|
},
|
|
209
149
|
},
|
|
210
150
|
},
|
|
211
|
-
// DISABLED: get_entities tool - not useful in current form
|
|
212
|
-
// {
|
|
213
|
-
// name: "get_entities",
|
|
214
|
-
// description:
|
|
215
|
-
// "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.",
|
|
216
|
-
// inputSchema: {
|
|
217
|
-
// type: "object",
|
|
218
|
-
// properties: {
|
|
219
|
-
// memory_id: {
|
|
220
|
-
// type: "string",
|
|
221
|
-
// description:
|
|
222
|
-
// "Memory ID to get entities for. RECOMMENDED: Always provide memory_id to get focused results.",
|
|
223
|
-
// },
|
|
224
|
-
// },
|
|
225
|
-
// },
|
|
226
|
-
// },
|
|
227
|
-
{
|
|
228
|
-
name: "delete_memory",
|
|
229
|
-
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.",
|
|
230
|
-
inputSchema: {
|
|
231
|
-
type: "object",
|
|
232
|
-
properties: {
|
|
233
|
-
memory_ids: {
|
|
234
|
-
oneOf: [
|
|
235
|
-
{
|
|
236
|
-
type: "string",
|
|
237
|
-
description: "Single memory ID to delete",
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
type: "array",
|
|
241
|
-
items: { type: "string" },
|
|
242
|
-
description: "Array of memory IDs to delete",
|
|
243
|
-
},
|
|
244
|
-
],
|
|
245
|
-
description: "Single memory ID or array of memory IDs to delete",
|
|
246
|
-
},
|
|
247
|
-
},
|
|
248
|
-
required: ["memory_ids"],
|
|
249
|
-
},
|
|
250
|
-
},
|
|
251
151
|
{
|
|
252
152
|
name: "list_spaces",
|
|
253
153
|
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).",
|
|
@@ -315,183 +215,6 @@ const TOOLS = [
|
|
|
315
215
|
required: ["space_id"],
|
|
316
216
|
},
|
|
317
217
|
},
|
|
318
|
-
{
|
|
319
|
-
name: "add_task",
|
|
320
|
-
description: "Create one or more tasks in your space with status tracking and priority levels. Supports BATCH creation and NESTED subtasks. Accepts a single task object or an array of task objects. Tasks have graph relationships like memories (entities, topics, temporal). REQUIRES space_id parameter. Example with subtasks: {tasks: {title: 'Parent', content: 'Main task', subtasks: [{title: 'Subtask 1', content: 'Child task'}]}}",
|
|
321
|
-
inputSchema: {
|
|
322
|
-
type: "object",
|
|
323
|
-
properties: {
|
|
324
|
-
space_id: {
|
|
325
|
-
type: "string",
|
|
326
|
-
description: "REQUIRED: Space to create task/tasks in (use list_spaces to see available options)",
|
|
327
|
-
},
|
|
328
|
-
tasks: {
|
|
329
|
-
oneOf: [
|
|
330
|
-
{
|
|
331
|
-
type: "object",
|
|
332
|
-
properties: {
|
|
333
|
-
title: {
|
|
334
|
-
type: "string",
|
|
335
|
-
description: "Task title/summary",
|
|
336
|
-
},
|
|
337
|
-
content: {
|
|
338
|
-
type: "string",
|
|
339
|
-
description: "Detailed task description",
|
|
340
|
-
},
|
|
341
|
-
topics: {
|
|
342
|
-
type: "array",
|
|
343
|
-
items: { type: "string" },
|
|
344
|
-
description: "Optional topics/tags for organization",
|
|
345
|
-
},
|
|
346
|
-
status: {
|
|
347
|
-
type: "string",
|
|
348
|
-
enum: ["pending", "in_progress", "completed", "invalidated"],
|
|
349
|
-
description: "Task status (default: pending)",
|
|
350
|
-
default: "pending",
|
|
351
|
-
},
|
|
352
|
-
priority: {
|
|
353
|
-
type: "string",
|
|
354
|
-
enum: ["urgent", "high", "medium", "low"],
|
|
355
|
-
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.",
|
|
356
|
-
default: "medium",
|
|
357
|
-
},
|
|
358
|
-
parent_id: {
|
|
359
|
-
type: "string",
|
|
360
|
-
description: "Optional parent task ID to create this as a subtask. Use an existing task's ID (format: task_TIMESTAMP_ID) to nest this task under it. Use list_tasks to find parent task IDs. If omitted, creates a top-level task. NOTE: Use 'subtasks' array instead for creating parent+children in one call.",
|
|
361
|
-
},
|
|
362
|
-
subtasks: {
|
|
363
|
-
type: "array",
|
|
364
|
-
items: {
|
|
365
|
-
type: "object",
|
|
366
|
-
properties: {
|
|
367
|
-
title: {
|
|
368
|
-
type: "string",
|
|
369
|
-
description: "Subtask title",
|
|
370
|
-
},
|
|
371
|
-
content: {
|
|
372
|
-
type: "string",
|
|
373
|
-
description: "Subtask description/details",
|
|
374
|
-
},
|
|
375
|
-
topics: {
|
|
376
|
-
type: "array",
|
|
377
|
-
items: { type: "string" },
|
|
378
|
-
description: "Topics/tags for this subtask",
|
|
379
|
-
},
|
|
380
|
-
status: {
|
|
381
|
-
type: "string",
|
|
382
|
-
enum: [
|
|
383
|
-
"pending",
|
|
384
|
-
"in_progress",
|
|
385
|
-
"completed",
|
|
386
|
-
"invalidated",
|
|
387
|
-
],
|
|
388
|
-
description: "Subtask status (default: pending)",
|
|
389
|
-
default: "pending",
|
|
390
|
-
},
|
|
391
|
-
priority: {
|
|
392
|
-
type: "string",
|
|
393
|
-
enum: ["urgent", "high", "medium", "low"],
|
|
394
|
-
description: "Subtask priority level (default: medium)",
|
|
395
|
-
default: "medium",
|
|
396
|
-
},
|
|
397
|
-
},
|
|
398
|
-
required: ["title", "content"],
|
|
399
|
-
},
|
|
400
|
-
description: "Optional array of subtasks to create under this parent task. Each will be automatically linked to the parent.",
|
|
401
|
-
},
|
|
402
|
-
},
|
|
403
|
-
required: ["title", "content"],
|
|
404
|
-
},
|
|
405
|
-
{
|
|
406
|
-
type: "array",
|
|
407
|
-
items: {
|
|
408
|
-
type: "object",
|
|
409
|
-
properties: {
|
|
410
|
-
title: {
|
|
411
|
-
type: "string",
|
|
412
|
-
description: "Task title/summary",
|
|
413
|
-
},
|
|
414
|
-
content: {
|
|
415
|
-
type: "string",
|
|
416
|
-
description: "Detailed task description",
|
|
417
|
-
},
|
|
418
|
-
topics: {
|
|
419
|
-
type: "array",
|
|
420
|
-
items: { type: "string" },
|
|
421
|
-
description: "Optional topics/tags for organization",
|
|
422
|
-
},
|
|
423
|
-
status: {
|
|
424
|
-
type: "string",
|
|
425
|
-
enum: [
|
|
426
|
-
"pending",
|
|
427
|
-
"in_progress",
|
|
428
|
-
"completed",
|
|
429
|
-
"invalidated",
|
|
430
|
-
],
|
|
431
|
-
description: "Task status (default: pending)",
|
|
432
|
-
default: "pending",
|
|
433
|
-
},
|
|
434
|
-
priority: {
|
|
435
|
-
type: "string",
|
|
436
|
-
enum: ["urgent", "high", "medium", "low"],
|
|
437
|
-
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.",
|
|
438
|
-
default: "medium",
|
|
439
|
-
},
|
|
440
|
-
parent_id: {
|
|
441
|
-
type: "string",
|
|
442
|
-
description: "Optional parent task ID to create this as a subtask. Use an existing task's ID (format: task_TIMESTAMP_ID) to nest this task under it. Use list_tasks to find parent task IDs. If omitted, creates a top-level task. NOTE: Use 'subtasks' array instead for creating parent+children in one call.",
|
|
443
|
-
},
|
|
444
|
-
subtasks: {
|
|
445
|
-
type: "array",
|
|
446
|
-
items: {
|
|
447
|
-
type: "object",
|
|
448
|
-
properties: {
|
|
449
|
-
title: {
|
|
450
|
-
type: "string",
|
|
451
|
-
description: "Subtask title",
|
|
452
|
-
},
|
|
453
|
-
content: {
|
|
454
|
-
type: "string",
|
|
455
|
-
description: "Subtask description/details",
|
|
456
|
-
},
|
|
457
|
-
topics: {
|
|
458
|
-
type: "array",
|
|
459
|
-
items: { type: "string" },
|
|
460
|
-
description: "Topics/tags for this subtask",
|
|
461
|
-
},
|
|
462
|
-
status: {
|
|
463
|
-
type: "string",
|
|
464
|
-
enum: [
|
|
465
|
-
"pending",
|
|
466
|
-
"in_progress",
|
|
467
|
-
"completed",
|
|
468
|
-
"invalidated",
|
|
469
|
-
],
|
|
470
|
-
description: "Subtask status (default: pending)",
|
|
471
|
-
default: "pending",
|
|
472
|
-
},
|
|
473
|
-
priority: {
|
|
474
|
-
type: "string",
|
|
475
|
-
enum: ["urgent", "high", "medium", "low"],
|
|
476
|
-
description: "Subtask priority level (default: medium)",
|
|
477
|
-
default: "medium",
|
|
478
|
-
},
|
|
479
|
-
},
|
|
480
|
-
required: ["title", "content"],
|
|
481
|
-
},
|
|
482
|
-
description: "Optional array of subtasks to create under this parent task. Each will be automatically linked to the parent.",
|
|
483
|
-
},
|
|
484
|
-
},
|
|
485
|
-
required: ["title", "content"],
|
|
486
|
-
},
|
|
487
|
-
},
|
|
488
|
-
],
|
|
489
|
-
description: "Single task object or array of task objects to create",
|
|
490
|
-
},
|
|
491
|
-
},
|
|
492
|
-
required: ["space_id", "tasks"],
|
|
493
|
-
},
|
|
494
|
-
},
|
|
495
218
|
{
|
|
496
219
|
name: "update_memory",
|
|
497
220
|
description: "Unified tool for ALL memory operations: add, update, or delete context and tasks. Supports any combination of operations in a single call. Context = general information/knowledge (Memory nodes). Tasks = actionable workflow items (Task nodes). Max 50 operations per call. At least one operation (add/update/delete) required.",
|
|
@@ -540,7 +263,12 @@ const TOOLS = [
|
|
|
540
263
|
},
|
|
541
264
|
status: {
|
|
542
265
|
type: "string",
|
|
543
|
-
enum: [
|
|
266
|
+
enum: [
|
|
267
|
+
"pending",
|
|
268
|
+
"in_progress",
|
|
269
|
+
"completed",
|
|
270
|
+
"invalidated",
|
|
271
|
+
],
|
|
544
272
|
description: "Task status (default: pending)",
|
|
545
273
|
},
|
|
546
274
|
priority: {
|
|
@@ -604,7 +332,12 @@ const TOOLS = [
|
|
|
604
332
|
},
|
|
605
333
|
status: {
|
|
606
334
|
type: "string",
|
|
607
|
-
enum: [
|
|
335
|
+
enum: [
|
|
336
|
+
"pending",
|
|
337
|
+
"in_progress",
|
|
338
|
+
"completed",
|
|
339
|
+
"invalidated",
|
|
340
|
+
],
|
|
608
341
|
description: "New status (optional)",
|
|
609
342
|
},
|
|
610
343
|
priority: {
|
|
@@ -639,89 +372,6 @@ const TOOLS = [
|
|
|
639
372
|
required: ["space_id"],
|
|
640
373
|
},
|
|
641
374
|
},
|
|
642
|
-
{
|
|
643
|
-
name: "update_task_status",
|
|
644
|
-
description: "Change a task's status (pending/in_progress/completed/invalidated)",
|
|
645
|
-
inputSchema: {
|
|
646
|
-
type: "object",
|
|
647
|
-
properties: {
|
|
648
|
-
task_id: {
|
|
649
|
-
type: "string",
|
|
650
|
-
description: "Task ID to update",
|
|
651
|
-
},
|
|
652
|
-
status: {
|
|
653
|
-
type: "string",
|
|
654
|
-
enum: ["pending", "in_progress", "completed", "invalidated"],
|
|
655
|
-
description: "New status",
|
|
656
|
-
},
|
|
657
|
-
},
|
|
658
|
-
required: ["task_id", "status"],
|
|
659
|
-
},
|
|
660
|
-
},
|
|
661
|
-
{
|
|
662
|
-
name: "update_task",
|
|
663
|
-
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.",
|
|
664
|
-
inputSchema: {
|
|
665
|
-
type: "object",
|
|
666
|
-
properties: {
|
|
667
|
-
updates: {
|
|
668
|
-
oneOf: [
|
|
669
|
-
{
|
|
670
|
-
type: "object",
|
|
671
|
-
properties: {
|
|
672
|
-
task_id: {
|
|
673
|
-
type: "string",
|
|
674
|
-
description: "Task ID to update",
|
|
675
|
-
},
|
|
676
|
-
title: {
|
|
677
|
-
type: "string",
|
|
678
|
-
description: "New title (optional)",
|
|
679
|
-
},
|
|
680
|
-
content: {
|
|
681
|
-
type: "string",
|
|
682
|
-
description: "New content (optional)",
|
|
683
|
-
},
|
|
684
|
-
topics: {
|
|
685
|
-
type: "array",
|
|
686
|
-
items: { type: "string" },
|
|
687
|
-
description: "New topics array (optional)",
|
|
688
|
-
},
|
|
689
|
-
},
|
|
690
|
-
required: ["task_id"],
|
|
691
|
-
},
|
|
692
|
-
{
|
|
693
|
-
type: "array",
|
|
694
|
-
items: {
|
|
695
|
-
type: "object",
|
|
696
|
-
properties: {
|
|
697
|
-
task_id: {
|
|
698
|
-
type: "string",
|
|
699
|
-
description: "Task ID to update",
|
|
700
|
-
},
|
|
701
|
-
title: {
|
|
702
|
-
type: "string",
|
|
703
|
-
description: "New title (optional)",
|
|
704
|
-
},
|
|
705
|
-
content: {
|
|
706
|
-
type: "string",
|
|
707
|
-
description: "New content (optional)",
|
|
708
|
-
},
|
|
709
|
-
topics: {
|
|
710
|
-
type: "array",
|
|
711
|
-
items: { type: "string" },
|
|
712
|
-
description: "New topics array (optional)",
|
|
713
|
-
},
|
|
714
|
-
},
|
|
715
|
-
required: ["task_id"],
|
|
716
|
-
},
|
|
717
|
-
},
|
|
718
|
-
],
|
|
719
|
-
description: "Single update object or array of update objects",
|
|
720
|
-
},
|
|
721
|
-
},
|
|
722
|
-
required: ["updates"],
|
|
723
|
-
},
|
|
724
|
-
},
|
|
725
375
|
{
|
|
726
376
|
name: "list_tasks",
|
|
727
377
|
description: "List tasks in a space with optional filtering",
|
|
@@ -751,48 +401,10 @@ const TOOLS = [
|
|
|
751
401
|
required: ["space_id"],
|
|
752
402
|
},
|
|
753
403
|
},
|
|
754
|
-
{
|
|
755
|
-
name: "delete_task",
|
|
756
|
-
description: "Delete one or more tasks in a single transaction. Accepts a single task ID or an array of task IDs for batch deletion.",
|
|
757
|
-
inputSchema: {
|
|
758
|
-
type: "object",
|
|
759
|
-
properties: {
|
|
760
|
-
task_ids: {
|
|
761
|
-
oneOf: [
|
|
762
|
-
{
|
|
763
|
-
type: "string",
|
|
764
|
-
description: "Single task ID to delete",
|
|
765
|
-
},
|
|
766
|
-
{
|
|
767
|
-
type: "array",
|
|
768
|
-
items: { type: "string" },
|
|
769
|
-
description: "Array of task IDs to delete",
|
|
770
|
-
},
|
|
771
|
-
],
|
|
772
|
-
description: "Single task ID or array of task IDs to delete",
|
|
773
|
-
},
|
|
774
|
-
},
|
|
775
|
-
required: ["task_ids"],
|
|
776
|
-
},
|
|
777
|
-
},
|
|
778
404
|
];
|
|
779
405
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
780
406
|
tools: TOOLS,
|
|
781
407
|
}));
|
|
782
|
-
async function handleAddMemory(args) {
|
|
783
|
-
// Require space_id to be provided
|
|
784
|
-
if (!args.space_id) {
|
|
785
|
-
throw new Error("space_id is required. Use list_spaces to see available options.");
|
|
786
|
-
}
|
|
787
|
-
if (!args.memories) {
|
|
788
|
-
throw new Error("memories parameter is required (single object or array)");
|
|
789
|
-
}
|
|
790
|
-
// Pass through to API
|
|
791
|
-
return makeApiCall("add-memory", {
|
|
792
|
-
space_id: args.space_id,
|
|
793
|
-
memories: args.memories,
|
|
794
|
-
});
|
|
795
|
-
}
|
|
796
408
|
async function handleSearchMemories(args) {
|
|
797
409
|
const { space_id, query, topics, max_results = 10, } = args;
|
|
798
410
|
// Require space_id
|
|
@@ -823,14 +435,6 @@ async function handleFetch(args) {
|
|
|
823
435
|
const { id, ids } = args;
|
|
824
436
|
return makeApiCall("fetch", { id, ids });
|
|
825
437
|
}
|
|
826
|
-
async function handleGetEntities(args) {
|
|
827
|
-
const { memory_id } = args;
|
|
828
|
-
return makeApiCall("get-entities", { memory_id });
|
|
829
|
-
}
|
|
830
|
-
async function handleDeleteMemory(args) {
|
|
831
|
-
const { memory_ids } = args;
|
|
832
|
-
return makeApiCall("delete-memory", { memory_ids });
|
|
833
|
-
}
|
|
834
438
|
async function handleListSpaces() {
|
|
835
439
|
return makeApiCall("list-spaces", {});
|
|
836
440
|
}
|
|
@@ -845,19 +449,6 @@ async function handleStart(args) {
|
|
|
845
449
|
const { space_id } = args;
|
|
846
450
|
return makeApiCall("start", { space_id });
|
|
847
451
|
}
|
|
848
|
-
async function handleAddTask(args) {
|
|
849
|
-
if (!args.space_id) {
|
|
850
|
-
throw new Error("space_id is required. Use list_spaces to see available options.");
|
|
851
|
-
}
|
|
852
|
-
if (!args.tasks) {
|
|
853
|
-
throw new Error("tasks parameter is required (single object or array)");
|
|
854
|
-
}
|
|
855
|
-
// Pass through to API
|
|
856
|
-
return makeApiCall("add-task", {
|
|
857
|
-
space_id: args.space_id,
|
|
858
|
-
tasks: args.tasks,
|
|
859
|
-
});
|
|
860
|
-
}
|
|
861
452
|
async function handleUpdateMemory(args) {
|
|
862
453
|
if (!args.space_id) {
|
|
863
454
|
throw new Error("space_id is required. Use list_spaces to see available options.");
|
|
@@ -873,33 +464,14 @@ async function handleUpdateMemory(args) {
|
|
|
873
464
|
delete: args.delete,
|
|
874
465
|
});
|
|
875
466
|
}
|
|
876
|
-
async function handleUpdateTaskStatus(args) {
|
|
877
|
-
return makeApiCall("update-task-status", args);
|
|
878
|
-
}
|
|
879
|
-
async function handleUpdateTask(args) {
|
|
880
|
-
if (!args.updates) {
|
|
881
|
-
throw new Error("updates parameter is required (single object or array)");
|
|
882
|
-
}
|
|
883
|
-
// Pass through to API
|
|
884
|
-
return makeApiCall("update-task", {
|
|
885
|
-
updates: args.updates,
|
|
886
|
-
});
|
|
887
|
-
}
|
|
888
467
|
async function handleListTasks(args) {
|
|
889
468
|
return makeApiCall("list-tasks", args);
|
|
890
469
|
}
|
|
891
|
-
async function handleDeleteTask(args) {
|
|
892
|
-
const { task_ids } = args;
|
|
893
|
-
return makeApiCall("delete-task", { task_ids });
|
|
894
|
-
}
|
|
895
470
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
896
471
|
const { name, arguments: args } = request.params;
|
|
897
472
|
try {
|
|
898
473
|
let result;
|
|
899
474
|
switch (name) {
|
|
900
|
-
case "add_memory":
|
|
901
|
-
result = await handleAddMemory(args);
|
|
902
|
-
break;
|
|
903
475
|
case "search_memories":
|
|
904
476
|
result = await handleSearchMemories(args);
|
|
905
477
|
break;
|
|
@@ -909,13 +481,6 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
909
481
|
case "fetch":
|
|
910
482
|
result = await handleFetch(args);
|
|
911
483
|
break;
|
|
912
|
-
// DISABLED: get_entities handler - not useful in current form
|
|
913
|
-
// case "get_entities":
|
|
914
|
-
// result = await handleGetEntities(args);
|
|
915
|
-
// break;
|
|
916
|
-
case "delete_memory":
|
|
917
|
-
result = await handleDeleteMemory(args);
|
|
918
|
-
break;
|
|
919
484
|
case "list_spaces":
|
|
920
485
|
result = await handleListSpaces();
|
|
921
486
|
break;
|
|
@@ -928,30 +493,21 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
928
493
|
case "start":
|
|
929
494
|
result = await handleStart(args);
|
|
930
495
|
break;
|
|
931
|
-
case "add_task":
|
|
932
|
-
result = await handleAddTask(args);
|
|
933
|
-
break;
|
|
934
496
|
case "update_memory":
|
|
935
497
|
result = await handleUpdateMemory(args);
|
|
936
498
|
break;
|
|
937
|
-
case "update_task_status":
|
|
938
|
-
result = await handleUpdateTaskStatus(args);
|
|
939
|
-
break;
|
|
940
|
-
case "update_task":
|
|
941
|
-
result = await handleUpdateTask(args);
|
|
942
|
-
break;
|
|
943
499
|
case "list_tasks":
|
|
944
500
|
result = await handleListTasks(args);
|
|
945
501
|
break;
|
|
946
|
-
case "delete_task":
|
|
947
|
-
result = await handleDeleteTask(args);
|
|
948
|
-
break;
|
|
949
502
|
default:
|
|
950
503
|
throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
951
504
|
}
|
|
952
505
|
// Extract response field for Layer 2 compressed tools, otherwise stringify full result
|
|
953
506
|
let responseText;
|
|
954
|
-
if (result &&
|
|
507
|
+
if (result &&
|
|
508
|
+
typeof result === "object" &&
|
|
509
|
+
"response" in result &&
|
|
510
|
+
typeof result.response === "string") {
|
|
955
511
|
// Tool has Layer 2 compression - use the formatted response field
|
|
956
512
|
responseText = result.response;
|
|
957
513
|
}
|
package/index.ts
CHANGED
|
@@ -108,71 +108,6 @@ const server = new Server(
|
|
|
108
108
|
);
|
|
109
109
|
|
|
110
110
|
const TOOLS = [
|
|
111
|
-
{
|
|
112
|
-
name: "add_memory",
|
|
113
|
-
description:
|
|
114
|
-
"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.",
|
|
115
|
-
inputSchema: {
|
|
116
|
-
type: "object",
|
|
117
|
-
properties: {
|
|
118
|
-
space_id: {
|
|
119
|
-
type: "string",
|
|
120
|
-
description:
|
|
121
|
-
"REQUIRED: Space to store memory/memories in (use list_spaces to see available options)",
|
|
122
|
-
},
|
|
123
|
-
memories: {
|
|
124
|
-
oneOf: [
|
|
125
|
-
{
|
|
126
|
-
type: "object",
|
|
127
|
-
properties: {
|
|
128
|
-
title: {
|
|
129
|
-
type: "string",
|
|
130
|
-
description: "Title/summary of the memory",
|
|
131
|
-
},
|
|
132
|
-
content: {
|
|
133
|
-
type: "string",
|
|
134
|
-
description: "Detailed content of the memory",
|
|
135
|
-
},
|
|
136
|
-
topics: {
|
|
137
|
-
type: "array",
|
|
138
|
-
items: { type: "string" },
|
|
139
|
-
description:
|
|
140
|
-
"Flexible topics/tags for organization (e.g., ['coding', 'react'])",
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
required: ["title", "content"],
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
type: "array",
|
|
147
|
-
items: {
|
|
148
|
-
type: "object",
|
|
149
|
-
properties: {
|
|
150
|
-
title: {
|
|
151
|
-
type: "string",
|
|
152
|
-
description: "Title/summary of the memory",
|
|
153
|
-
},
|
|
154
|
-
content: {
|
|
155
|
-
type: "string",
|
|
156
|
-
description: "Detailed content of the memory",
|
|
157
|
-
},
|
|
158
|
-
topics: {
|
|
159
|
-
type: "array",
|
|
160
|
-
items: { type: "string" },
|
|
161
|
-
description:
|
|
162
|
-
"Flexible topics/tags for organization (e.g., ['coding', 'react'])",
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
required: ["title", "content"],
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
],
|
|
169
|
-
description:
|
|
170
|
-
"Single memory object or array of memory objects to create",
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
required: ["space_id", "memories"],
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
111
|
{
|
|
177
112
|
name: "search_memories",
|
|
178
113
|
description:
|
|
@@ -250,47 +185,6 @@ const TOOLS = [
|
|
|
250
185
|
},
|
|
251
186
|
},
|
|
252
187
|
},
|
|
253
|
-
// DISABLED: get_entities tool - not useful in current form
|
|
254
|
-
// {
|
|
255
|
-
// name: "get_entities",
|
|
256
|
-
// description:
|
|
257
|
-
// "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.",
|
|
258
|
-
// inputSchema: {
|
|
259
|
-
// type: "object",
|
|
260
|
-
// properties: {
|
|
261
|
-
// memory_id: {
|
|
262
|
-
// type: "string",
|
|
263
|
-
// description:
|
|
264
|
-
// "Memory ID to get entities for. RECOMMENDED: Always provide memory_id to get focused results.",
|
|
265
|
-
// },
|
|
266
|
-
// },
|
|
267
|
-
// },
|
|
268
|
-
// },
|
|
269
|
-
{
|
|
270
|
-
name: "delete_memory",
|
|
271
|
-
description:
|
|
272
|
-
"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.",
|
|
273
|
-
inputSchema: {
|
|
274
|
-
type: "object",
|
|
275
|
-
properties: {
|
|
276
|
-
memory_ids: {
|
|
277
|
-
oneOf: [
|
|
278
|
-
{
|
|
279
|
-
type: "string",
|
|
280
|
-
description: "Single memory ID to delete",
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
type: "array",
|
|
284
|
-
items: { type: "string" },
|
|
285
|
-
description: "Array of memory IDs to delete",
|
|
286
|
-
},
|
|
287
|
-
],
|
|
288
|
-
description: "Single memory ID or array of memory IDs to delete",
|
|
289
|
-
},
|
|
290
|
-
},
|
|
291
|
-
required: ["memory_ids"],
|
|
292
|
-
},
|
|
293
|
-
},
|
|
294
188
|
{
|
|
295
189
|
name: "list_spaces",
|
|
296
190
|
description:
|
|
@@ -366,192 +260,6 @@ const TOOLS = [
|
|
|
366
260
|
required: ["space_id"],
|
|
367
261
|
},
|
|
368
262
|
},
|
|
369
|
-
{
|
|
370
|
-
name: "add_task",
|
|
371
|
-
description:
|
|
372
|
-
"Create one or more tasks in your space with status tracking and priority levels. Supports BATCH creation and NESTED subtasks. Accepts a single task object or an array of task objects. Tasks have graph relationships like memories (entities, topics, temporal). REQUIRES space_id parameter. Example with subtasks: {tasks: {title: 'Parent', content: 'Main task', subtasks: [{title: 'Subtask 1', content: 'Child task'}]}}",
|
|
373
|
-
inputSchema: {
|
|
374
|
-
type: "object",
|
|
375
|
-
properties: {
|
|
376
|
-
space_id: {
|
|
377
|
-
type: "string",
|
|
378
|
-
description:
|
|
379
|
-
"REQUIRED: Space to create task/tasks in (use list_spaces to see available options)",
|
|
380
|
-
},
|
|
381
|
-
tasks: {
|
|
382
|
-
oneOf: [
|
|
383
|
-
{
|
|
384
|
-
type: "object",
|
|
385
|
-
properties: {
|
|
386
|
-
title: {
|
|
387
|
-
type: "string",
|
|
388
|
-
description: "Task title/summary",
|
|
389
|
-
},
|
|
390
|
-
content: {
|
|
391
|
-
type: "string",
|
|
392
|
-
description: "Detailed task description",
|
|
393
|
-
},
|
|
394
|
-
topics: {
|
|
395
|
-
type: "array",
|
|
396
|
-
items: { type: "string" },
|
|
397
|
-
description: "Optional topics/tags for organization",
|
|
398
|
-
},
|
|
399
|
-
status: {
|
|
400
|
-
type: "string",
|
|
401
|
-
enum: ["pending", "in_progress", "completed", "invalidated"],
|
|
402
|
-
description: "Task status (default: pending)",
|
|
403
|
-
default: "pending",
|
|
404
|
-
},
|
|
405
|
-
priority: {
|
|
406
|
-
type: "string",
|
|
407
|
-
enum: ["urgent", "high", "medium", "low"],
|
|
408
|
-
description:
|
|
409
|
-
"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.",
|
|
410
|
-
default: "medium",
|
|
411
|
-
},
|
|
412
|
-
parent_id: {
|
|
413
|
-
type: "string",
|
|
414
|
-
description:
|
|
415
|
-
"Optional parent task ID to create this as a subtask. Use an existing task's ID (format: task_TIMESTAMP_ID) to nest this task under it. Use list_tasks to find parent task IDs. If omitted, creates a top-level task. NOTE: Use 'subtasks' array instead for creating parent+children in one call.",
|
|
416
|
-
},
|
|
417
|
-
subtasks: {
|
|
418
|
-
type: "array",
|
|
419
|
-
items: {
|
|
420
|
-
type: "object",
|
|
421
|
-
properties: {
|
|
422
|
-
title: {
|
|
423
|
-
type: "string",
|
|
424
|
-
description: "Subtask title",
|
|
425
|
-
},
|
|
426
|
-
content: {
|
|
427
|
-
type: "string",
|
|
428
|
-
description: "Subtask description/details",
|
|
429
|
-
},
|
|
430
|
-
topics: {
|
|
431
|
-
type: "array",
|
|
432
|
-
items: { type: "string" },
|
|
433
|
-
description: "Topics/tags for this subtask",
|
|
434
|
-
},
|
|
435
|
-
status: {
|
|
436
|
-
type: "string",
|
|
437
|
-
enum: [
|
|
438
|
-
"pending",
|
|
439
|
-
"in_progress",
|
|
440
|
-
"completed",
|
|
441
|
-
"invalidated",
|
|
442
|
-
],
|
|
443
|
-
description: "Subtask status (default: pending)",
|
|
444
|
-
default: "pending",
|
|
445
|
-
},
|
|
446
|
-
priority: {
|
|
447
|
-
type: "string",
|
|
448
|
-
enum: ["urgent", "high", "medium", "low"],
|
|
449
|
-
description: "Subtask priority level (default: medium)",
|
|
450
|
-
default: "medium",
|
|
451
|
-
},
|
|
452
|
-
},
|
|
453
|
-
required: ["title", "content"],
|
|
454
|
-
},
|
|
455
|
-
description:
|
|
456
|
-
"Optional array of subtasks to create under this parent task. Each will be automatically linked to the parent.",
|
|
457
|
-
},
|
|
458
|
-
},
|
|
459
|
-
required: ["title", "content"],
|
|
460
|
-
},
|
|
461
|
-
{
|
|
462
|
-
type: "array",
|
|
463
|
-
items: {
|
|
464
|
-
type: "object",
|
|
465
|
-
properties: {
|
|
466
|
-
title: {
|
|
467
|
-
type: "string",
|
|
468
|
-
description: "Task title/summary",
|
|
469
|
-
},
|
|
470
|
-
content: {
|
|
471
|
-
type: "string",
|
|
472
|
-
description: "Detailed task description",
|
|
473
|
-
},
|
|
474
|
-
topics: {
|
|
475
|
-
type: "array",
|
|
476
|
-
items: { type: "string" },
|
|
477
|
-
description: "Optional topics/tags for organization",
|
|
478
|
-
},
|
|
479
|
-
status: {
|
|
480
|
-
type: "string",
|
|
481
|
-
enum: [
|
|
482
|
-
"pending",
|
|
483
|
-
"in_progress",
|
|
484
|
-
"completed",
|
|
485
|
-
"invalidated",
|
|
486
|
-
],
|
|
487
|
-
description: "Task status (default: pending)",
|
|
488
|
-
default: "pending",
|
|
489
|
-
},
|
|
490
|
-
priority: {
|
|
491
|
-
type: "string",
|
|
492
|
-
enum: ["urgent", "high", "medium", "low"],
|
|
493
|
-
description:
|
|
494
|
-
"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.",
|
|
495
|
-
default: "medium",
|
|
496
|
-
},
|
|
497
|
-
parent_id: {
|
|
498
|
-
type: "string",
|
|
499
|
-
description:
|
|
500
|
-
"Optional parent task ID to create this as a subtask. Use an existing task's ID (format: task_TIMESTAMP_ID) to nest this task under it. Use list_tasks to find parent task IDs. If omitted, creates a top-level task. NOTE: Use 'subtasks' array instead for creating parent+children in one call.",
|
|
501
|
-
},
|
|
502
|
-
subtasks: {
|
|
503
|
-
type: "array",
|
|
504
|
-
items: {
|
|
505
|
-
type: "object",
|
|
506
|
-
properties: {
|
|
507
|
-
title: {
|
|
508
|
-
type: "string",
|
|
509
|
-
description: "Subtask title",
|
|
510
|
-
},
|
|
511
|
-
content: {
|
|
512
|
-
type: "string",
|
|
513
|
-
description: "Subtask description/details",
|
|
514
|
-
},
|
|
515
|
-
topics: {
|
|
516
|
-
type: "array",
|
|
517
|
-
items: { type: "string" },
|
|
518
|
-
description: "Topics/tags for this subtask",
|
|
519
|
-
},
|
|
520
|
-
status: {
|
|
521
|
-
type: "string",
|
|
522
|
-
enum: [
|
|
523
|
-
"pending",
|
|
524
|
-
"in_progress",
|
|
525
|
-
"completed",
|
|
526
|
-
"invalidated",
|
|
527
|
-
],
|
|
528
|
-
description: "Subtask status (default: pending)",
|
|
529
|
-
default: "pending",
|
|
530
|
-
},
|
|
531
|
-
priority: {
|
|
532
|
-
type: "string",
|
|
533
|
-
enum: ["urgent", "high", "medium", "low"],
|
|
534
|
-
description:
|
|
535
|
-
"Subtask priority level (default: medium)",
|
|
536
|
-
default: "medium",
|
|
537
|
-
},
|
|
538
|
-
},
|
|
539
|
-
required: ["title", "content"],
|
|
540
|
-
},
|
|
541
|
-
description:
|
|
542
|
-
"Optional array of subtasks to create under this parent task. Each will be automatically linked to the parent.",
|
|
543
|
-
},
|
|
544
|
-
},
|
|
545
|
-
required: ["title", "content"],
|
|
546
|
-
},
|
|
547
|
-
},
|
|
548
|
-
],
|
|
549
|
-
description: "Single task object or array of task objects to create",
|
|
550
|
-
},
|
|
551
|
-
},
|
|
552
|
-
required: ["space_id", "tasks"],
|
|
553
|
-
},
|
|
554
|
-
},
|
|
555
263
|
{
|
|
556
264
|
name: "update_memory",
|
|
557
265
|
description:
|
|
@@ -602,7 +310,12 @@ const TOOLS = [
|
|
|
602
310
|
},
|
|
603
311
|
status: {
|
|
604
312
|
type: "string",
|
|
605
|
-
enum: [
|
|
313
|
+
enum: [
|
|
314
|
+
"pending",
|
|
315
|
+
"in_progress",
|
|
316
|
+
"completed",
|
|
317
|
+
"invalidated",
|
|
318
|
+
],
|
|
606
319
|
description: "Task status (default: pending)",
|
|
607
320
|
},
|
|
608
321
|
priority: {
|
|
@@ -666,7 +379,12 @@ const TOOLS = [
|
|
|
666
379
|
},
|
|
667
380
|
status: {
|
|
668
381
|
type: "string",
|
|
669
|
-
enum: [
|
|
382
|
+
enum: [
|
|
383
|
+
"pending",
|
|
384
|
+
"in_progress",
|
|
385
|
+
"completed",
|
|
386
|
+
"invalidated",
|
|
387
|
+
],
|
|
670
388
|
description: "New status (optional)",
|
|
671
389
|
},
|
|
672
390
|
priority: {
|
|
@@ -701,91 +419,6 @@ const TOOLS = [
|
|
|
701
419
|
required: ["space_id"],
|
|
702
420
|
},
|
|
703
421
|
},
|
|
704
|
-
{
|
|
705
|
-
name: "update_task_status",
|
|
706
|
-
description:
|
|
707
|
-
"Change a task's status (pending/in_progress/completed/invalidated)",
|
|
708
|
-
inputSchema: {
|
|
709
|
-
type: "object",
|
|
710
|
-
properties: {
|
|
711
|
-
task_id: {
|
|
712
|
-
type: "string",
|
|
713
|
-
description: "Task ID to update",
|
|
714
|
-
},
|
|
715
|
-
status: {
|
|
716
|
-
type: "string",
|
|
717
|
-
enum: ["pending", "in_progress", "completed", "invalidated"],
|
|
718
|
-
description: "New status",
|
|
719
|
-
},
|
|
720
|
-
},
|
|
721
|
-
required: ["task_id", "status"],
|
|
722
|
-
},
|
|
723
|
-
},
|
|
724
|
-
{
|
|
725
|
-
name: "update_task",
|
|
726
|
-
description:
|
|
727
|
-
"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.",
|
|
728
|
-
inputSchema: {
|
|
729
|
-
type: "object",
|
|
730
|
-
properties: {
|
|
731
|
-
updates: {
|
|
732
|
-
oneOf: [
|
|
733
|
-
{
|
|
734
|
-
type: "object",
|
|
735
|
-
properties: {
|
|
736
|
-
task_id: {
|
|
737
|
-
type: "string",
|
|
738
|
-
description: "Task ID to update",
|
|
739
|
-
},
|
|
740
|
-
title: {
|
|
741
|
-
type: "string",
|
|
742
|
-
description: "New title (optional)",
|
|
743
|
-
},
|
|
744
|
-
content: {
|
|
745
|
-
type: "string",
|
|
746
|
-
description: "New content (optional)",
|
|
747
|
-
},
|
|
748
|
-
topics: {
|
|
749
|
-
type: "array",
|
|
750
|
-
items: { type: "string" },
|
|
751
|
-
description: "New topics array (optional)",
|
|
752
|
-
},
|
|
753
|
-
},
|
|
754
|
-
required: ["task_id"],
|
|
755
|
-
},
|
|
756
|
-
{
|
|
757
|
-
type: "array",
|
|
758
|
-
items: {
|
|
759
|
-
type: "object",
|
|
760
|
-
properties: {
|
|
761
|
-
task_id: {
|
|
762
|
-
type: "string",
|
|
763
|
-
description: "Task ID to update",
|
|
764
|
-
},
|
|
765
|
-
title: {
|
|
766
|
-
type: "string",
|
|
767
|
-
description: "New title (optional)",
|
|
768
|
-
},
|
|
769
|
-
content: {
|
|
770
|
-
type: "string",
|
|
771
|
-
description: "New content (optional)",
|
|
772
|
-
},
|
|
773
|
-
topics: {
|
|
774
|
-
type: "array",
|
|
775
|
-
items: { type: "string" },
|
|
776
|
-
description: "New topics array (optional)",
|
|
777
|
-
},
|
|
778
|
-
},
|
|
779
|
-
required: ["task_id"],
|
|
780
|
-
},
|
|
781
|
-
},
|
|
782
|
-
],
|
|
783
|
-
description: "Single update object or array of update objects",
|
|
784
|
-
},
|
|
785
|
-
},
|
|
786
|
-
required: ["updates"],
|
|
787
|
-
},
|
|
788
|
-
},
|
|
789
422
|
{
|
|
790
423
|
name: "list_tasks",
|
|
791
424
|
description: "List tasks in a space with optional filtering",
|
|
@@ -815,56 +448,12 @@ const TOOLS = [
|
|
|
815
448
|
required: ["space_id"],
|
|
816
449
|
},
|
|
817
450
|
},
|
|
818
|
-
{
|
|
819
|
-
name: "delete_task",
|
|
820
|
-
description:
|
|
821
|
-
"Delete one or more tasks in a single transaction. Accepts a single task ID or an array of task IDs for batch deletion.",
|
|
822
|
-
inputSchema: {
|
|
823
|
-
type: "object",
|
|
824
|
-
properties: {
|
|
825
|
-
task_ids: {
|
|
826
|
-
oneOf: [
|
|
827
|
-
{
|
|
828
|
-
type: "string",
|
|
829
|
-
description: "Single task ID to delete",
|
|
830
|
-
},
|
|
831
|
-
{
|
|
832
|
-
type: "array",
|
|
833
|
-
items: { type: "string" },
|
|
834
|
-
description: "Array of task IDs to delete",
|
|
835
|
-
},
|
|
836
|
-
],
|
|
837
|
-
description: "Single task ID or array of task IDs to delete",
|
|
838
|
-
},
|
|
839
|
-
},
|
|
840
|
-
required: ["task_ids"],
|
|
841
|
-
},
|
|
842
|
-
},
|
|
843
451
|
];
|
|
844
452
|
|
|
845
453
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
846
454
|
tools: TOOLS,
|
|
847
455
|
}));
|
|
848
456
|
|
|
849
|
-
async function handleAddMemory(args: any) {
|
|
850
|
-
// Require space_id to be provided
|
|
851
|
-
if (!args.space_id) {
|
|
852
|
-
throw new Error(
|
|
853
|
-
"space_id is required. Use list_spaces to see available options.",
|
|
854
|
-
);
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
if (!args.memories) {
|
|
858
|
-
throw new Error("memories parameter is required (single object or array)");
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
// Pass through to API
|
|
862
|
-
return makeApiCall("add-memory", {
|
|
863
|
-
space_id: args.space_id,
|
|
864
|
-
memories: args.memories,
|
|
865
|
-
});
|
|
866
|
-
}
|
|
867
|
-
|
|
868
457
|
async function handleSearchMemories(args: any) {
|
|
869
458
|
const {
|
|
870
459
|
space_id,
|
|
@@ -925,20 +514,6 @@ async function handleFetch(args: any) {
|
|
|
925
514
|
return makeApiCall("fetch", { id, ids });
|
|
926
515
|
}
|
|
927
516
|
|
|
928
|
-
async function handleGetEntities(args: any) {
|
|
929
|
-
const { memory_id } = args as { memory_id?: string };
|
|
930
|
-
|
|
931
|
-
return makeApiCall("get-entities", { memory_id });
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
async function handleDeleteMemory(args: any) {
|
|
935
|
-
const { memory_ids } = args as {
|
|
936
|
-
memory_ids: string | string[];
|
|
937
|
-
};
|
|
938
|
-
|
|
939
|
-
return makeApiCall("delete-memory", { memory_ids });
|
|
940
|
-
}
|
|
941
|
-
|
|
942
517
|
async function handleListSpaces() {
|
|
943
518
|
return makeApiCall("list-spaces", {});
|
|
944
519
|
}
|
|
@@ -957,24 +532,6 @@ async function handleStart(args: any) {
|
|
|
957
532
|
return makeApiCall("start", { space_id });
|
|
958
533
|
}
|
|
959
534
|
|
|
960
|
-
async function handleAddTask(args: any) {
|
|
961
|
-
if (!args.space_id) {
|
|
962
|
-
throw new Error(
|
|
963
|
-
"space_id is required. Use list_spaces to see available options.",
|
|
964
|
-
);
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
if (!args.tasks) {
|
|
968
|
-
throw new Error("tasks parameter is required (single object or array)");
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
// Pass through to API
|
|
972
|
-
return makeApiCall("add-task", {
|
|
973
|
-
space_id: args.space_id,
|
|
974
|
-
tasks: args.tasks,
|
|
975
|
-
});
|
|
976
|
-
}
|
|
977
|
-
|
|
978
535
|
async function handleUpdateMemory(args: any) {
|
|
979
536
|
if (!args.space_id) {
|
|
980
537
|
throw new Error(
|
|
@@ -997,33 +554,10 @@ async function handleUpdateMemory(args: any) {
|
|
|
997
554
|
});
|
|
998
555
|
}
|
|
999
556
|
|
|
1000
|
-
async function handleUpdateTaskStatus(args: any) {
|
|
1001
|
-
return makeApiCall("update-task-status", args);
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
async function handleUpdateTask(args: any) {
|
|
1005
|
-
if (!args.updates) {
|
|
1006
|
-
throw new Error("updates parameter is required (single object or array)");
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
// Pass through to API
|
|
1010
|
-
return makeApiCall("update-task", {
|
|
1011
|
-
updates: args.updates,
|
|
1012
|
-
});
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
557
|
async function handleListTasks(args: any) {
|
|
1016
558
|
return makeApiCall("list-tasks", args);
|
|
1017
559
|
}
|
|
1018
560
|
|
|
1019
|
-
async function handleDeleteTask(args: any) {
|
|
1020
|
-
const { task_ids } = args as {
|
|
1021
|
-
task_ids: string | string[];
|
|
1022
|
-
};
|
|
1023
|
-
|
|
1024
|
-
return makeApiCall("delete-task", { task_ids });
|
|
1025
|
-
}
|
|
1026
|
-
|
|
1027
561
|
server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
|
|
1028
562
|
const { name, arguments: args } = request.params;
|
|
1029
563
|
|
|
@@ -1031,9 +565,6 @@ server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
|
|
|
1031
565
|
let result: any;
|
|
1032
566
|
|
|
1033
567
|
switch (name) {
|
|
1034
|
-
case "add_memory":
|
|
1035
|
-
result = await handleAddMemory(args);
|
|
1036
|
-
break;
|
|
1037
568
|
case "search_memories":
|
|
1038
569
|
result = await handleSearchMemories(args);
|
|
1039
570
|
break;
|
|
@@ -1043,13 +574,6 @@ server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
|
|
|
1043
574
|
case "fetch":
|
|
1044
575
|
result = await handleFetch(args);
|
|
1045
576
|
break;
|
|
1046
|
-
// DISABLED: get_entities handler - not useful in current form
|
|
1047
|
-
// case "get_entities":
|
|
1048
|
-
// result = await handleGetEntities(args);
|
|
1049
|
-
// break;
|
|
1050
|
-
case "delete_memory":
|
|
1051
|
-
result = await handleDeleteMemory(args);
|
|
1052
|
-
break;
|
|
1053
577
|
case "list_spaces":
|
|
1054
578
|
result = await handleListSpaces();
|
|
1055
579
|
break;
|
|
@@ -1062,31 +586,24 @@ server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
|
|
|
1062
586
|
case "start":
|
|
1063
587
|
result = await handleStart(args);
|
|
1064
588
|
break;
|
|
1065
|
-
case "add_task":
|
|
1066
|
-
result = await handleAddTask(args);
|
|
1067
|
-
break;
|
|
1068
589
|
case "update_memory":
|
|
1069
590
|
result = await handleUpdateMemory(args);
|
|
1070
591
|
break;
|
|
1071
|
-
case "update_task_status":
|
|
1072
|
-
result = await handleUpdateTaskStatus(args);
|
|
1073
|
-
break;
|
|
1074
|
-
case "update_task":
|
|
1075
|
-
result = await handleUpdateTask(args);
|
|
1076
|
-
break;
|
|
1077
592
|
case "list_tasks":
|
|
1078
593
|
result = await handleListTasks(args);
|
|
1079
594
|
break;
|
|
1080
|
-
case "delete_task":
|
|
1081
|
-
result = await handleDeleteTask(args);
|
|
1082
|
-
break;
|
|
1083
595
|
default:
|
|
1084
596
|
throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
1085
597
|
}
|
|
1086
598
|
|
|
1087
599
|
// Extract response field for Layer 2 compressed tools, otherwise stringify full result
|
|
1088
600
|
let responseText: string;
|
|
1089
|
-
if (
|
|
601
|
+
if (
|
|
602
|
+
result &&
|
|
603
|
+
typeof result === "object" &&
|
|
604
|
+
"response" in result &&
|
|
605
|
+
typeof result.response === "string"
|
|
606
|
+
) {
|
|
1090
607
|
// Tool has Layer 2 compression - use the formatted response field
|
|
1091
608
|
responseText = result.response;
|
|
1092
609
|
} else {
|
package/package.json
CHANGED
|
@@ -1,51 +1,52 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
2
|
+
"name": "@intangle/mcp-server",
|
|
3
|
+
"version": "1.1.8",
|
|
4
|
+
"description": "Model Context Protocol server for Intangle - AI memory that persists across conversations",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"start": "node dist/index.js",
|
|
9
|
+
"dev": "tsx watch index.ts",
|
|
10
|
+
"build": "tsc",
|
|
11
|
+
"lint": "biome check .",
|
|
12
|
+
"lint:fix": "biome check --fix .",
|
|
13
|
+
"prepublishOnly": "npm run build"
|
|
14
|
+
},
|
|
15
|
+
"bin": {
|
|
16
|
+
"intangle-mcp": "dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"mcp",
|
|
20
|
+
"model-context-protocol",
|
|
21
|
+
"claude",
|
|
22
|
+
"claude-code",
|
|
23
|
+
"ai",
|
|
24
|
+
"memory",
|
|
25
|
+
"knowledge-management",
|
|
26
|
+
"intangle",
|
|
27
|
+
"claude-desktop",
|
|
28
|
+
"anthropic"
|
|
29
|
+
],
|
|
30
|
+
"author": "Intangle",
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/intangle/mcp-server.git"
|
|
35
|
+
},
|
|
36
|
+
"homepage": "https://intangle.app",
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=18.0.0"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
42
|
+
"dotenv": "^17.2.0",
|
|
43
|
+
"node-fetch": "^3.3.2"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@biomejs/biome": "^1.9.4",
|
|
47
|
+
"@types/node": "^22.0.0",
|
|
48
|
+
"@types/node-fetch": "^2.6.12",
|
|
49
|
+
"tsx": "^4.0.0",
|
|
50
|
+
"typescript": "^5.0.0"
|
|
51
|
+
}
|
|
52
|
+
}
|