@intangle/mcp-server 1.0.8 → 1.0.9
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 +37 -63
- package/index.ts +40 -70
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -135,18 +135,13 @@ const TOOLS = [
|
|
|
135
135
|
},
|
|
136
136
|
{
|
|
137
137
|
name: "search_memories",
|
|
138
|
-
description: "Search through stored memories using advanced hybrid search (semantic + text + entity relationships). ALWAYS provide
|
|
138
|
+
description: "Search through stored memories using advanced hybrid search (semantic + text + entity relationships). 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",
|
|
@@ -205,28 +200,23 @@ const TOOLS = [
|
|
|
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 memories in a single transaction. 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"],
|
|
@@ -501,28 +491,23 @@ const TOOLS = [
|
|
|
501
491
|
},
|
|
502
492
|
{
|
|
503
493
|
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.",
|
|
494
|
+
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
495
|
inputSchema: {
|
|
520
496
|
type: "object",
|
|
521
497
|
properties: {
|
|
522
498
|
task_ids: {
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
499
|
+
oneOf: [
|
|
500
|
+
{
|
|
501
|
+
type: "string",
|
|
502
|
+
description: "Single task ID to delete",
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
type: "array",
|
|
506
|
+
items: { type: "string" },
|
|
507
|
+
description: "Array of task IDs to delete",
|
|
508
|
+
},
|
|
509
|
+
],
|
|
510
|
+
description: "Single task ID or array of task IDs to delete",
|
|
526
511
|
},
|
|
527
512
|
},
|
|
528
513
|
required: ["task_ids"],
|
|
@@ -547,14 +532,14 @@ async function handleAddMemory(args) {
|
|
|
547
532
|
});
|
|
548
533
|
}
|
|
549
534
|
async function handleSearchMemories(args) {
|
|
550
|
-
const { space_id,
|
|
551
|
-
// Require
|
|
552
|
-
if (!space_id
|
|
553
|
-
throw new Error("
|
|
535
|
+
const { space_id, query, topics, max_results = 10, } = args;
|
|
536
|
+
// Require space_id
|
|
537
|
+
if (!space_id) {
|
|
538
|
+
throw new Error("space_id is required. Use list_spaces to see available options.");
|
|
554
539
|
}
|
|
555
540
|
return makeApiCall("search-memories", {
|
|
556
541
|
space_id,
|
|
557
|
-
space_ids,
|
|
542
|
+
space_ids: [space_id], // Convert to array for backend compatibility
|
|
558
543
|
query,
|
|
559
544
|
topics,
|
|
560
545
|
max_results,
|
|
@@ -577,8 +562,8 @@ async function handleGetEntities(args) {
|
|
|
577
562
|
return makeApiCall("get-entities", { memory_id });
|
|
578
563
|
}
|
|
579
564
|
async function handleDeleteMemory(args) {
|
|
580
|
-
const {
|
|
581
|
-
return makeApiCall("delete-memory", {
|
|
565
|
+
const { memory_ids } = args;
|
|
566
|
+
return makeApiCall("delete-memory", { memory_ids });
|
|
582
567
|
}
|
|
583
568
|
async function handleDebugStructure() {
|
|
584
569
|
return makeApiCall("debug-structure", {});
|
|
@@ -626,13 +611,8 @@ async function handleListTasks(args) {
|
|
|
626
611
|
return makeApiCall("list-tasks", args);
|
|
627
612
|
}
|
|
628
613
|
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);
|
|
614
|
+
const { task_ids } = args;
|
|
615
|
+
return makeApiCall("delete-task", { task_ids });
|
|
636
616
|
}
|
|
637
617
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
638
618
|
const { name, arguments: args } = request.params;
|
|
@@ -684,12 +664,6 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
684
664
|
case "delete_task":
|
|
685
665
|
result = await handleDeleteTask(args);
|
|
686
666
|
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
667
|
default:
|
|
694
668
|
throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
695
669
|
}
|
package/index.ts
CHANGED
|
@@ -164,20 +164,14 @@ const TOOLS = [
|
|
|
164
164
|
{
|
|
165
165
|
name: "search_memories",
|
|
166
166
|
description:
|
|
167
|
-
"Search through stored memories using advanced hybrid search (semantic + text + entity relationships). ALWAYS provide
|
|
167
|
+
"Search through stored memories using advanced hybrid search (semantic + text + entity relationships). 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",
|
|
@@ -239,29 +233,23 @@ const TOOLS = [
|
|
|
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 memories in a single transaction. 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"],
|
|
@@ -542,29 +530,23 @@ const TOOLS = [
|
|
|
542
530
|
},
|
|
543
531
|
{
|
|
544
532
|
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.",
|
|
533
|
+
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
534
|
inputSchema: {
|
|
562
535
|
type: "object",
|
|
563
536
|
properties: {
|
|
564
537
|
task_ids: {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
538
|
+
oneOf: [
|
|
539
|
+
{
|
|
540
|
+
type: "string",
|
|
541
|
+
description: "Single task ID to delete",
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
type: "array",
|
|
545
|
+
items: { type: "string" },
|
|
546
|
+
description: "Array of task IDs to delete",
|
|
547
|
+
},
|
|
548
|
+
],
|
|
549
|
+
description: "Single task ID or array of task IDs to delete",
|
|
568
550
|
},
|
|
569
551
|
},
|
|
570
552
|
required: ["task_ids"],
|
|
@@ -598,28 +580,26 @@ async function handleAddMemory(args: any) {
|
|
|
598
580
|
async function handleSearchMemories(args: any) {
|
|
599
581
|
const {
|
|
600
582
|
space_id,
|
|
601
|
-
space_ids,
|
|
602
583
|
query,
|
|
603
584
|
topics,
|
|
604
585
|
max_results = 10,
|
|
605
586
|
} = args as {
|
|
606
|
-
space_id
|
|
607
|
-
space_ids?: string[];
|
|
587
|
+
space_id: string;
|
|
608
588
|
query: string;
|
|
609
589
|
topics?: string[];
|
|
610
590
|
max_results?: number;
|
|
611
591
|
};
|
|
612
592
|
|
|
613
|
-
// Require
|
|
614
|
-
if (!space_id
|
|
593
|
+
// Require space_id
|
|
594
|
+
if (!space_id) {
|
|
615
595
|
throw new Error(
|
|
616
|
-
"
|
|
596
|
+
"space_id is required. Use list_spaces to see available options.",
|
|
617
597
|
);
|
|
618
598
|
}
|
|
619
599
|
|
|
620
600
|
return makeApiCall("search-memories", {
|
|
621
601
|
space_id,
|
|
622
|
-
space_ids,
|
|
602
|
+
space_ids: [space_id], // Convert to array for backend compatibility
|
|
623
603
|
query,
|
|
624
604
|
topics,
|
|
625
605
|
max_results,
|
|
@@ -658,11 +638,11 @@ async function handleGetEntities(args: any) {
|
|
|
658
638
|
}
|
|
659
639
|
|
|
660
640
|
async function handleDeleteMemory(args: any) {
|
|
661
|
-
const {
|
|
662
|
-
|
|
641
|
+
const { memory_ids } = args as {
|
|
642
|
+
memory_ids: string | string[];
|
|
663
643
|
};
|
|
664
644
|
|
|
665
|
-
return makeApiCall("delete-memory", {
|
|
645
|
+
return makeApiCall("delete-memory", { memory_ids });
|
|
666
646
|
}
|
|
667
647
|
|
|
668
648
|
async function handleDebugStructure() {
|
|
@@ -725,15 +705,11 @@ async function handleListTasks(args: any) {
|
|
|
725
705
|
}
|
|
726
706
|
|
|
727
707
|
async function handleDeleteTask(args: any) {
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
async function handleBatchDeleteMemories(args: any) {
|
|
732
|
-
return makeApiCall("batch-delete-memories", args);
|
|
733
|
-
}
|
|
708
|
+
const { task_ids } = args as {
|
|
709
|
+
task_ids: string | string[];
|
|
710
|
+
};
|
|
734
711
|
|
|
735
|
-
|
|
736
|
-
return makeApiCall("batch-delete-tasks", args);
|
|
712
|
+
return makeApiCall("delete-task", { task_ids });
|
|
737
713
|
}
|
|
738
714
|
|
|
739
715
|
server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
|
|
@@ -788,12 +764,6 @@ server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
|
|
|
788
764
|
case "delete_task":
|
|
789
765
|
result = await handleDeleteTask(args);
|
|
790
766
|
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
767
|
default:
|
|
798
768
|
throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
799
769
|
}
|