@intangle/mcp-server 1.1.1 → 1.1.3
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 +196 -8
- package/index.ts +250 -28
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7,9 +7,9 @@ import fetch from "node-fetch";
|
|
|
7
7
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
8
8
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
9
9
|
import { CallToolRequestSchema, ErrorCode, ListToolsRequestSchema, McpError, } from "@modelcontextprotocol/sdk/types.js";
|
|
10
|
-
import { readFileSync } from
|
|
11
|
-
import { fileURLToPath } from
|
|
12
|
-
import { dirname, join } from
|
|
10
|
+
import { readFileSync } from "fs";
|
|
11
|
+
import { fileURLToPath } from "url";
|
|
12
|
+
import { dirname, join } from "path";
|
|
13
13
|
// Load environment variables from .env and .env.local
|
|
14
14
|
config({ quiet: true });
|
|
15
15
|
config({ path: ".env.local", quiet: true });
|
|
@@ -25,7 +25,7 @@ if (!MCP_API_KEY) {
|
|
|
25
25
|
console.log("Intangle MCP Server starting - connecting to", API_BASE_URL);
|
|
26
26
|
// Version checking - automatically read from package.json
|
|
27
27
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
28
|
-
const packageJson = JSON.parse(readFileSync(join(__dirname,
|
|
28
|
+
const packageJson = JSON.parse(readFileSync(join(__dirname, "../package.json"), "utf-8"));
|
|
29
29
|
const CURRENT_VERSION = packageJson.version;
|
|
30
30
|
let latestVersion = null;
|
|
31
31
|
let versionCheckDone = false;
|
|
@@ -34,7 +34,7 @@ async function checkVersion() {
|
|
|
34
34
|
return;
|
|
35
35
|
try {
|
|
36
36
|
const response = await fetch("https://registry.npmjs.org/@intangle/mcp-server/latest");
|
|
37
|
-
const data = await response.json();
|
|
37
|
+
const data = (await response.json());
|
|
38
38
|
latestVersion = data.version;
|
|
39
39
|
versionCheckDone = true;
|
|
40
40
|
if (latestVersion && latestVersion !== CURRENT_VERSION) {
|
|
@@ -60,6 +60,7 @@ async function makeApiCall(endpoint, data) {
|
|
|
60
60
|
headers: {
|
|
61
61
|
"Content-Type": "application/json",
|
|
62
62
|
Authorization: `Bearer ${MCP_API_KEY}`,
|
|
63
|
+
"User-Agent": "MCP-Client-Stdio/1.1.2 (mcp)",
|
|
63
64
|
},
|
|
64
65
|
body: JSON.stringify(data),
|
|
65
66
|
});
|
|
@@ -375,7 +376,12 @@ const TOOLS = [
|
|
|
375
376
|
},
|
|
376
377
|
status: {
|
|
377
378
|
type: "string",
|
|
378
|
-
enum: [
|
|
379
|
+
enum: [
|
|
380
|
+
"pending",
|
|
381
|
+
"in_progress",
|
|
382
|
+
"completed",
|
|
383
|
+
"invalidated",
|
|
384
|
+
],
|
|
379
385
|
description: "Subtask status (default: pending)",
|
|
380
386
|
default: "pending",
|
|
381
387
|
},
|
|
@@ -413,7 +419,12 @@ const TOOLS = [
|
|
|
413
419
|
},
|
|
414
420
|
status: {
|
|
415
421
|
type: "string",
|
|
416
|
-
enum: [
|
|
422
|
+
enum: [
|
|
423
|
+
"pending",
|
|
424
|
+
"in_progress",
|
|
425
|
+
"completed",
|
|
426
|
+
"invalidated",
|
|
427
|
+
],
|
|
417
428
|
description: "Task status (default: pending)",
|
|
418
429
|
default: "pending",
|
|
419
430
|
},
|
|
@@ -447,7 +458,12 @@ const TOOLS = [
|
|
|
447
458
|
},
|
|
448
459
|
status: {
|
|
449
460
|
type: "string",
|
|
450
|
-
enum: [
|
|
461
|
+
enum: [
|
|
462
|
+
"pending",
|
|
463
|
+
"in_progress",
|
|
464
|
+
"completed",
|
|
465
|
+
"invalidated",
|
|
466
|
+
],
|
|
451
467
|
description: "Subtask status (default: pending)",
|
|
452
468
|
default: "pending",
|
|
453
469
|
},
|
|
@@ -473,6 +489,161 @@ const TOOLS = [
|
|
|
473
489
|
required: ["space_id", "tasks"],
|
|
474
490
|
},
|
|
475
491
|
},
|
|
492
|
+
{
|
|
493
|
+
name: "update_memory",
|
|
494
|
+
description: "Update memory with new CONTEXT and TASKS. Unified tool for adding new items to the memory system in one call. NOTE: 'Memories' encompasses both context (general information, stored as Memory nodes) and tasks (actionable items, stored as Task nodes). This tool is for ADDING new items to update the memory system, not modifying existing ones. At least one of context or tasks must be provided. REQUIRES space_id parameter.",
|
|
495
|
+
inputSchema: {
|
|
496
|
+
type: "object",
|
|
497
|
+
properties: {
|
|
498
|
+
space_id: {
|
|
499
|
+
type: "string",
|
|
500
|
+
description: "REQUIRED: Space to add items to (use list_spaces to see available options)",
|
|
501
|
+
},
|
|
502
|
+
context: {
|
|
503
|
+
oneOf: [
|
|
504
|
+
{
|
|
505
|
+
type: "object",
|
|
506
|
+
properties: {
|
|
507
|
+
title: {
|
|
508
|
+
type: "string",
|
|
509
|
+
description: "Context item title",
|
|
510
|
+
},
|
|
511
|
+
content: {
|
|
512
|
+
type: "string",
|
|
513
|
+
description: "Context item content (general information/knowledge)",
|
|
514
|
+
},
|
|
515
|
+
topics: {
|
|
516
|
+
type: "array",
|
|
517
|
+
items: { type: "string" },
|
|
518
|
+
description: "Optional topics/tags for organization",
|
|
519
|
+
},
|
|
520
|
+
source: {
|
|
521
|
+
type: "string",
|
|
522
|
+
enum: ["chatgpt", "claude-app", "claude-code", "intangle"],
|
|
523
|
+
description: "Optional source indicator",
|
|
524
|
+
},
|
|
525
|
+
},
|
|
526
|
+
required: ["title", "content"],
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
type: "array",
|
|
530
|
+
items: {
|
|
531
|
+
type: "object",
|
|
532
|
+
properties: {
|
|
533
|
+
title: {
|
|
534
|
+
type: "string",
|
|
535
|
+
description: "Context item title",
|
|
536
|
+
},
|
|
537
|
+
content: {
|
|
538
|
+
type: "string",
|
|
539
|
+
description: "Context item content (general information/knowledge)",
|
|
540
|
+
},
|
|
541
|
+
topics: {
|
|
542
|
+
type: "array",
|
|
543
|
+
items: { type: "string" },
|
|
544
|
+
description: "Optional topics/tags for organization",
|
|
545
|
+
},
|
|
546
|
+
source: {
|
|
547
|
+
type: "string",
|
|
548
|
+
enum: ["chatgpt", "claude-app", "claude-code", "intangle"],
|
|
549
|
+
description: "Optional source indicator",
|
|
550
|
+
},
|
|
551
|
+
},
|
|
552
|
+
required: ["title", "content"],
|
|
553
|
+
},
|
|
554
|
+
},
|
|
555
|
+
],
|
|
556
|
+
description: "Optional context items to add (general information/knowledge)",
|
|
557
|
+
},
|
|
558
|
+
tasks: {
|
|
559
|
+
oneOf: [
|
|
560
|
+
{
|
|
561
|
+
type: "object",
|
|
562
|
+
properties: {
|
|
563
|
+
title: {
|
|
564
|
+
type: "string",
|
|
565
|
+
description: "Task title/summary",
|
|
566
|
+
},
|
|
567
|
+
content: {
|
|
568
|
+
type: "string",
|
|
569
|
+
description: "Detailed task description",
|
|
570
|
+
},
|
|
571
|
+
topics: {
|
|
572
|
+
type: "array",
|
|
573
|
+
items: { type: "string" },
|
|
574
|
+
description: "Optional topics/tags for organization",
|
|
575
|
+
},
|
|
576
|
+
status: {
|
|
577
|
+
type: "string",
|
|
578
|
+
enum: ["pending", "in_progress", "completed", "invalidated"],
|
|
579
|
+
description: "Task status (default: pending)",
|
|
580
|
+
default: "pending",
|
|
581
|
+
},
|
|
582
|
+
priority: {
|
|
583
|
+
type: "string",
|
|
584
|
+
enum: ["urgent", "high", "medium", "low"],
|
|
585
|
+
description: "Task priority level (default: medium)",
|
|
586
|
+
default: "medium",
|
|
587
|
+
},
|
|
588
|
+
source: {
|
|
589
|
+
type: "string",
|
|
590
|
+
enum: ["chatgpt", "claude-app", "claude-code", "intangle"],
|
|
591
|
+
description: "Optional source indicator",
|
|
592
|
+
},
|
|
593
|
+
},
|
|
594
|
+
required: ["title", "content"],
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
type: "array",
|
|
598
|
+
items: {
|
|
599
|
+
type: "object",
|
|
600
|
+
properties: {
|
|
601
|
+
title: {
|
|
602
|
+
type: "string",
|
|
603
|
+
description: "Task title/summary",
|
|
604
|
+
},
|
|
605
|
+
content: {
|
|
606
|
+
type: "string",
|
|
607
|
+
description: "Detailed task description",
|
|
608
|
+
},
|
|
609
|
+
topics: {
|
|
610
|
+
type: "array",
|
|
611
|
+
items: { type: "string" },
|
|
612
|
+
description: "Optional topics/tags for organization",
|
|
613
|
+
},
|
|
614
|
+
status: {
|
|
615
|
+
type: "string",
|
|
616
|
+
enum: [
|
|
617
|
+
"pending",
|
|
618
|
+
"in_progress",
|
|
619
|
+
"completed",
|
|
620
|
+
"invalidated",
|
|
621
|
+
],
|
|
622
|
+
description: "Task status (default: pending)",
|
|
623
|
+
default: "pending",
|
|
624
|
+
},
|
|
625
|
+
priority: {
|
|
626
|
+
type: "string",
|
|
627
|
+
enum: ["urgent", "high", "medium", "low"],
|
|
628
|
+
description: "Task priority level (default: medium)",
|
|
629
|
+
default: "medium",
|
|
630
|
+
},
|
|
631
|
+
source: {
|
|
632
|
+
type: "string",
|
|
633
|
+
enum: ["chatgpt", "claude-app", "claude-code", "intangle"],
|
|
634
|
+
description: "Optional source indicator",
|
|
635
|
+
},
|
|
636
|
+
},
|
|
637
|
+
required: ["title", "content"],
|
|
638
|
+
},
|
|
639
|
+
},
|
|
640
|
+
],
|
|
641
|
+
description: "Optional tasks to add (actionable workflow items)",
|
|
642
|
+
},
|
|
643
|
+
},
|
|
644
|
+
required: ["space_id"],
|
|
645
|
+
},
|
|
646
|
+
},
|
|
476
647
|
{
|
|
477
648
|
name: "update_task_status",
|
|
478
649
|
description: "Change a task's status (pending/in_progress/completed/invalidated)",
|
|
@@ -692,6 +863,20 @@ async function handleAddTask(args) {
|
|
|
692
863
|
tasks: args.tasks,
|
|
693
864
|
});
|
|
694
865
|
}
|
|
866
|
+
async function handleUpdateMemory(args) {
|
|
867
|
+
if (!args.space_id) {
|
|
868
|
+
throw new Error("space_id is required. Use list_spaces to see available options.");
|
|
869
|
+
}
|
|
870
|
+
if (!args.context && !args.tasks) {
|
|
871
|
+
throw new Error("At least one of context or tasks must be provided");
|
|
872
|
+
}
|
|
873
|
+
// Pass through to API
|
|
874
|
+
return makeApiCall("update-memory", {
|
|
875
|
+
space_id: args.space_id,
|
|
876
|
+
context: args.context,
|
|
877
|
+
tasks: args.tasks,
|
|
878
|
+
});
|
|
879
|
+
}
|
|
695
880
|
async function handleUpdateTaskStatus(args) {
|
|
696
881
|
return makeApiCall("update-task-status", args);
|
|
697
882
|
}
|
|
@@ -749,6 +934,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
749
934
|
case "add_task":
|
|
750
935
|
result = await handleAddTask(args);
|
|
751
936
|
break;
|
|
937
|
+
case "update_memory":
|
|
938
|
+
result = await handleUpdateMemory(args);
|
|
939
|
+
break;
|
|
752
940
|
case "update_task_status":
|
|
753
941
|
result = await handleUpdateTaskStatus(args);
|
|
754
942
|
break;
|
package/index.ts
CHANGED
|
@@ -14,9 +14,9 @@ import {
|
|
|
14
14
|
ListToolsRequestSchema,
|
|
15
15
|
McpError,
|
|
16
16
|
} from "@modelcontextprotocol/sdk/types.js";
|
|
17
|
-
import { readFileSync } from
|
|
18
|
-
import { fileURLToPath } from
|
|
19
|
-
import { dirname, join } from
|
|
17
|
+
import { readFileSync } from "fs";
|
|
18
|
+
import { fileURLToPath } from "url";
|
|
19
|
+
import { dirname, join } from "path";
|
|
20
20
|
|
|
21
21
|
// Load environment variables from .env and .env.local
|
|
22
22
|
config({ quiet: true });
|
|
@@ -30,7 +30,9 @@ const MCP_API_KEY = process.env.MCP_API_KEY;
|
|
|
30
30
|
|
|
31
31
|
if (!MCP_API_KEY) {
|
|
32
32
|
console.error("Error: MCP_API_KEY environment variable is required");
|
|
33
|
-
console.error(
|
|
33
|
+
console.error(
|
|
34
|
+
"Please set your Intangle API key in the Claude Desktop configuration",
|
|
35
|
+
);
|
|
34
36
|
process.exit(1);
|
|
35
37
|
}
|
|
36
38
|
|
|
@@ -38,7 +40,9 @@ console.log("Intangle MCP Server starting - connecting to", API_BASE_URL);
|
|
|
38
40
|
|
|
39
41
|
// Version checking - automatically read from package.json
|
|
40
42
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
41
|
-
const packageJson = JSON.parse(
|
|
43
|
+
const packageJson = JSON.parse(
|
|
44
|
+
readFileSync(join(__dirname, "../package.json"), "utf-8"),
|
|
45
|
+
);
|
|
42
46
|
const CURRENT_VERSION = packageJson.version;
|
|
43
47
|
let latestVersion: string | null = null;
|
|
44
48
|
let versionCheckDone = false;
|
|
@@ -47,8 +51,10 @@ async function checkVersion() {
|
|
|
47
51
|
if (versionCheckDone) return;
|
|
48
52
|
|
|
49
53
|
try {
|
|
50
|
-
const response = await fetch(
|
|
51
|
-
|
|
54
|
+
const response = await fetch(
|
|
55
|
+
"https://registry.npmjs.org/@intangle/mcp-server/latest",
|
|
56
|
+
);
|
|
57
|
+
const data = (await response.json()) as { version: string };
|
|
52
58
|
latestVersion = data.version;
|
|
53
59
|
versionCheckDone = true;
|
|
54
60
|
|
|
@@ -75,6 +81,7 @@ async function makeApiCall(endpoint: string, data: any) {
|
|
|
75
81
|
headers: {
|
|
76
82
|
"Content-Type": "application/json",
|
|
77
83
|
Authorization: `Bearer ${MCP_API_KEY}`,
|
|
84
|
+
"User-Agent": "MCP-Client-Stdio/1.1.2 (mcp)",
|
|
78
85
|
},
|
|
79
86
|
body: JSON.stringify(data),
|
|
80
87
|
});
|
|
@@ -159,7 +166,8 @@ const TOOLS = [
|
|
|
159
166
|
},
|
|
160
167
|
},
|
|
161
168
|
],
|
|
162
|
-
description:
|
|
169
|
+
description:
|
|
170
|
+
"Single memory object or array of memory objects to create",
|
|
163
171
|
},
|
|
164
172
|
},
|
|
165
173
|
required: ["space_id", "memories"],
|
|
@@ -230,12 +238,14 @@ const TOOLS = [
|
|
|
230
238
|
properties: {
|
|
231
239
|
id: {
|
|
232
240
|
type: "string",
|
|
233
|
-
description:
|
|
241
|
+
description:
|
|
242
|
+
"Single ID to fetch (context or task ID like 'mem_123' or 'task_456')",
|
|
234
243
|
},
|
|
235
244
|
ids: {
|
|
236
245
|
type: "array",
|
|
237
246
|
items: { type: "string" },
|
|
238
|
-
description:
|
|
247
|
+
description:
|
|
248
|
+
"Array of IDs to fetch (mix of context and task IDs). Use this to fetch multiple items in one call.",
|
|
239
249
|
},
|
|
240
250
|
},
|
|
241
251
|
},
|
|
@@ -249,14 +259,16 @@ const TOOLS = [
|
|
|
249
259
|
properties: {
|
|
250
260
|
memory_id: {
|
|
251
261
|
type: "string",
|
|
252
|
-
description:
|
|
262
|
+
description:
|
|
263
|
+
"Memory ID to get entities for. RECOMMENDED: Always provide memory_id to get focused results.",
|
|
253
264
|
},
|
|
254
265
|
},
|
|
255
266
|
},
|
|
256
267
|
},
|
|
257
268
|
{
|
|
258
269
|
name: "delete_memory",
|
|
259
|
-
description:
|
|
270
|
+
description:
|
|
271
|
+
"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.",
|
|
260
272
|
inputSchema: {
|
|
261
273
|
type: "object",
|
|
262
274
|
properties: {
|
|
@@ -296,23 +308,28 @@ const TOOLS = [
|
|
|
296
308
|
properties: {
|
|
297
309
|
name: {
|
|
298
310
|
type: "string",
|
|
299
|
-
description:
|
|
311
|
+
description:
|
|
312
|
+
"Name for the space (e.g., 'Work', 'Personal', 'Project X')",
|
|
300
313
|
},
|
|
301
314
|
description: {
|
|
302
315
|
type: "string",
|
|
303
|
-
description:
|
|
316
|
+
description:
|
|
317
|
+
"Brief description of what this space is for (e.g., 'Work-related context and tasks')",
|
|
304
318
|
},
|
|
305
319
|
startup_context: {
|
|
306
320
|
type: "string",
|
|
307
|
-
description:
|
|
321
|
+
description:
|
|
322
|
+
"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.",
|
|
308
323
|
},
|
|
309
324
|
startup_preferences: {
|
|
310
325
|
type: "string",
|
|
311
|
-
description:
|
|
326
|
+
description:
|
|
327
|
+
"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').",
|
|
312
328
|
},
|
|
313
329
|
include_tasks: {
|
|
314
330
|
type: "boolean",
|
|
315
|
-
description:
|
|
331
|
+
description:
|
|
332
|
+
"Whether to automatically retrieve pending/in-progress tasks when running the 'start' tool for this space",
|
|
316
333
|
default: false,
|
|
317
334
|
},
|
|
318
335
|
},
|
|
@@ -393,7 +410,8 @@ const TOOLS = [
|
|
|
393
410
|
},
|
|
394
411
|
parent_id: {
|
|
395
412
|
type: "string",
|
|
396
|
-
description:
|
|
413
|
+
description:
|
|
414
|
+
"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.",
|
|
397
415
|
},
|
|
398
416
|
subtasks: {
|
|
399
417
|
type: "array",
|
|
@@ -415,7 +433,12 @@ const TOOLS = [
|
|
|
415
433
|
},
|
|
416
434
|
status: {
|
|
417
435
|
type: "string",
|
|
418
|
-
enum: [
|
|
436
|
+
enum: [
|
|
437
|
+
"pending",
|
|
438
|
+
"in_progress",
|
|
439
|
+
"completed",
|
|
440
|
+
"invalidated",
|
|
441
|
+
],
|
|
419
442
|
description: "Subtask status (default: pending)",
|
|
420
443
|
default: "pending",
|
|
421
444
|
},
|
|
@@ -428,7 +451,8 @@ const TOOLS = [
|
|
|
428
451
|
},
|
|
429
452
|
required: ["title", "content"],
|
|
430
453
|
},
|
|
431
|
-
description:
|
|
454
|
+
description:
|
|
455
|
+
"Optional array of subtasks to create under this parent task. Each will be automatically linked to the parent.",
|
|
432
456
|
},
|
|
433
457
|
},
|
|
434
458
|
required: ["title", "content"],
|
|
@@ -453,7 +477,12 @@ const TOOLS = [
|
|
|
453
477
|
},
|
|
454
478
|
status: {
|
|
455
479
|
type: "string",
|
|
456
|
-
enum: [
|
|
480
|
+
enum: [
|
|
481
|
+
"pending",
|
|
482
|
+
"in_progress",
|
|
483
|
+
"completed",
|
|
484
|
+
"invalidated",
|
|
485
|
+
],
|
|
457
486
|
description: "Task status (default: pending)",
|
|
458
487
|
default: "pending",
|
|
459
488
|
},
|
|
@@ -466,7 +495,8 @@ const TOOLS = [
|
|
|
466
495
|
},
|
|
467
496
|
parent_id: {
|
|
468
497
|
type: "string",
|
|
469
|
-
description:
|
|
498
|
+
description:
|
|
499
|
+
"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.",
|
|
470
500
|
},
|
|
471
501
|
subtasks: {
|
|
472
502
|
type: "array",
|
|
@@ -488,20 +518,27 @@ const TOOLS = [
|
|
|
488
518
|
},
|
|
489
519
|
status: {
|
|
490
520
|
type: "string",
|
|
491
|
-
enum: [
|
|
521
|
+
enum: [
|
|
522
|
+
"pending",
|
|
523
|
+
"in_progress",
|
|
524
|
+
"completed",
|
|
525
|
+
"invalidated",
|
|
526
|
+
],
|
|
492
527
|
description: "Subtask status (default: pending)",
|
|
493
528
|
default: "pending",
|
|
494
529
|
},
|
|
495
530
|
priority: {
|
|
496
531
|
type: "string",
|
|
497
532
|
enum: ["urgent", "high", "medium", "low"],
|
|
498
|
-
description:
|
|
533
|
+
description:
|
|
534
|
+
"Subtask priority level (default: medium)",
|
|
499
535
|
default: "medium",
|
|
500
536
|
},
|
|
501
537
|
},
|
|
502
538
|
required: ["title", "content"],
|
|
503
539
|
},
|
|
504
|
-
description:
|
|
540
|
+
description:
|
|
541
|
+
"Optional array of subtasks to create under this parent task. Each will be automatically linked to the parent.",
|
|
505
542
|
},
|
|
506
543
|
},
|
|
507
544
|
required: ["title", "content"],
|
|
@@ -514,9 +551,170 @@ const TOOLS = [
|
|
|
514
551
|
required: ["space_id", "tasks"],
|
|
515
552
|
},
|
|
516
553
|
},
|
|
554
|
+
{
|
|
555
|
+
name: "update_memory",
|
|
556
|
+
description:
|
|
557
|
+
"Update memory with new CONTEXT and TASKS. Unified tool for adding new items to the memory system in one call. NOTE: 'Memories' encompasses both context (general information, stored as Memory nodes) and tasks (actionable items, stored as Task nodes). This tool is for ADDING new items to update the memory system, not modifying existing ones. At least one of context or tasks must be provided. REQUIRES space_id parameter.",
|
|
558
|
+
inputSchema: {
|
|
559
|
+
type: "object",
|
|
560
|
+
properties: {
|
|
561
|
+
space_id: {
|
|
562
|
+
type: "string",
|
|
563
|
+
description:
|
|
564
|
+
"REQUIRED: Space to add items to (use list_spaces to see available options)",
|
|
565
|
+
},
|
|
566
|
+
context: {
|
|
567
|
+
oneOf: [
|
|
568
|
+
{
|
|
569
|
+
type: "object",
|
|
570
|
+
properties: {
|
|
571
|
+
title: {
|
|
572
|
+
type: "string",
|
|
573
|
+
description: "Context item title",
|
|
574
|
+
},
|
|
575
|
+
content: {
|
|
576
|
+
type: "string",
|
|
577
|
+
description:
|
|
578
|
+
"Context item content (general information/knowledge)",
|
|
579
|
+
},
|
|
580
|
+
topics: {
|
|
581
|
+
type: "array",
|
|
582
|
+
items: { type: "string" },
|
|
583
|
+
description: "Optional topics/tags for organization",
|
|
584
|
+
},
|
|
585
|
+
source: {
|
|
586
|
+
type: "string",
|
|
587
|
+
enum: ["chatgpt", "claude-app", "claude-code", "intangle"],
|
|
588
|
+
description: "Optional source indicator",
|
|
589
|
+
},
|
|
590
|
+
},
|
|
591
|
+
required: ["title", "content"],
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
type: "array",
|
|
595
|
+
items: {
|
|
596
|
+
type: "object",
|
|
597
|
+
properties: {
|
|
598
|
+
title: {
|
|
599
|
+
type: "string",
|
|
600
|
+
description: "Context item title",
|
|
601
|
+
},
|
|
602
|
+
content: {
|
|
603
|
+
type: "string",
|
|
604
|
+
description:
|
|
605
|
+
"Context item content (general information/knowledge)",
|
|
606
|
+
},
|
|
607
|
+
topics: {
|
|
608
|
+
type: "array",
|
|
609
|
+
items: { type: "string" },
|
|
610
|
+
description: "Optional topics/tags for organization",
|
|
611
|
+
},
|
|
612
|
+
source: {
|
|
613
|
+
type: "string",
|
|
614
|
+
enum: ["chatgpt", "claude-app", "claude-code", "intangle"],
|
|
615
|
+
description: "Optional source indicator",
|
|
616
|
+
},
|
|
617
|
+
},
|
|
618
|
+
required: ["title", "content"],
|
|
619
|
+
},
|
|
620
|
+
},
|
|
621
|
+
],
|
|
622
|
+
description:
|
|
623
|
+
"Optional context items to add (general information/knowledge)",
|
|
624
|
+
},
|
|
625
|
+
tasks: {
|
|
626
|
+
oneOf: [
|
|
627
|
+
{
|
|
628
|
+
type: "object",
|
|
629
|
+
properties: {
|
|
630
|
+
title: {
|
|
631
|
+
type: "string",
|
|
632
|
+
description: "Task title/summary",
|
|
633
|
+
},
|
|
634
|
+
content: {
|
|
635
|
+
type: "string",
|
|
636
|
+
description: "Detailed task description",
|
|
637
|
+
},
|
|
638
|
+
topics: {
|
|
639
|
+
type: "array",
|
|
640
|
+
items: { type: "string" },
|
|
641
|
+
description: "Optional topics/tags for organization",
|
|
642
|
+
},
|
|
643
|
+
status: {
|
|
644
|
+
type: "string",
|
|
645
|
+
enum: ["pending", "in_progress", "completed", "invalidated"],
|
|
646
|
+
description: "Task status (default: pending)",
|
|
647
|
+
default: "pending",
|
|
648
|
+
},
|
|
649
|
+
priority: {
|
|
650
|
+
type: "string",
|
|
651
|
+
enum: ["urgent", "high", "medium", "low"],
|
|
652
|
+
description: "Task priority level (default: medium)",
|
|
653
|
+
default: "medium",
|
|
654
|
+
},
|
|
655
|
+
source: {
|
|
656
|
+
type: "string",
|
|
657
|
+
enum: ["chatgpt", "claude-app", "claude-code", "intangle"],
|
|
658
|
+
description: "Optional source indicator",
|
|
659
|
+
},
|
|
660
|
+
},
|
|
661
|
+
required: ["title", "content"],
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
type: "array",
|
|
665
|
+
items: {
|
|
666
|
+
type: "object",
|
|
667
|
+
properties: {
|
|
668
|
+
title: {
|
|
669
|
+
type: "string",
|
|
670
|
+
description: "Task title/summary",
|
|
671
|
+
},
|
|
672
|
+
content: {
|
|
673
|
+
type: "string",
|
|
674
|
+
description: "Detailed task description",
|
|
675
|
+
},
|
|
676
|
+
topics: {
|
|
677
|
+
type: "array",
|
|
678
|
+
items: { type: "string" },
|
|
679
|
+
description: "Optional topics/tags for organization",
|
|
680
|
+
},
|
|
681
|
+
status: {
|
|
682
|
+
type: "string",
|
|
683
|
+
enum: [
|
|
684
|
+
"pending",
|
|
685
|
+
"in_progress",
|
|
686
|
+
"completed",
|
|
687
|
+
"invalidated",
|
|
688
|
+
],
|
|
689
|
+
description: "Task status (default: pending)",
|
|
690
|
+
default: "pending",
|
|
691
|
+
},
|
|
692
|
+
priority: {
|
|
693
|
+
type: "string",
|
|
694
|
+
enum: ["urgent", "high", "medium", "low"],
|
|
695
|
+
description: "Task priority level (default: medium)",
|
|
696
|
+
default: "medium",
|
|
697
|
+
},
|
|
698
|
+
source: {
|
|
699
|
+
type: "string",
|
|
700
|
+
enum: ["chatgpt", "claude-app", "claude-code", "intangle"],
|
|
701
|
+
description: "Optional source indicator",
|
|
702
|
+
},
|
|
703
|
+
},
|
|
704
|
+
required: ["title", "content"],
|
|
705
|
+
},
|
|
706
|
+
},
|
|
707
|
+
],
|
|
708
|
+
description: "Optional tasks to add (actionable workflow items)",
|
|
709
|
+
},
|
|
710
|
+
},
|
|
711
|
+
required: ["space_id"],
|
|
712
|
+
},
|
|
713
|
+
},
|
|
517
714
|
{
|
|
518
715
|
name: "update_task_status",
|
|
519
|
-
description:
|
|
716
|
+
description:
|
|
717
|
+
"Change a task's status (pending/in_progress/completed/invalidated)",
|
|
520
718
|
inputSchema: {
|
|
521
719
|
type: "object",
|
|
522
720
|
properties: {
|
|
@@ -535,7 +733,8 @@ const TOOLS = [
|
|
|
535
733
|
},
|
|
536
734
|
{
|
|
537
735
|
name: "update_task",
|
|
538
|
-
description:
|
|
736
|
+
description:
|
|
737
|
+
"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.",
|
|
539
738
|
inputSchema: {
|
|
540
739
|
type: "object",
|
|
541
740
|
properties: {
|
|
@@ -628,7 +827,8 @@ const TOOLS = [
|
|
|
628
827
|
},
|
|
629
828
|
{
|
|
630
829
|
name: "delete_task",
|
|
631
|
-
description:
|
|
830
|
+
description:
|
|
831
|
+
"Delete one or more tasks in a single transaction. Accepts a single task ID or an array of task IDs for batch deletion.",
|
|
632
832
|
inputSchema: {
|
|
633
833
|
type: "object",
|
|
634
834
|
properties: {
|
|
@@ -785,6 +985,25 @@ async function handleAddTask(args: any) {
|
|
|
785
985
|
});
|
|
786
986
|
}
|
|
787
987
|
|
|
988
|
+
async function handleUpdateMemory(args: any) {
|
|
989
|
+
if (!args.space_id) {
|
|
990
|
+
throw new Error(
|
|
991
|
+
"space_id is required. Use list_spaces to see available options.",
|
|
992
|
+
);
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
if (!args.context && !args.tasks) {
|
|
996
|
+
throw new Error("At least one of context or tasks must be provided");
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
// Pass through to API
|
|
1000
|
+
return makeApiCall("update-memory", {
|
|
1001
|
+
space_id: args.space_id,
|
|
1002
|
+
context: args.context,
|
|
1003
|
+
tasks: args.tasks,
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
|
|
788
1007
|
async function handleUpdateTaskStatus(args: any) {
|
|
789
1008
|
return makeApiCall("update-task-status", args);
|
|
790
1009
|
}
|
|
@@ -852,6 +1071,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
|
|
|
852
1071
|
case "add_task":
|
|
853
1072
|
result = await handleAddTask(args);
|
|
854
1073
|
break;
|
|
1074
|
+
case "update_memory":
|
|
1075
|
+
result = await handleUpdateMemory(args);
|
|
1076
|
+
break;
|
|
855
1077
|
case "update_task_status":
|
|
856
1078
|
result = await handleUpdateTaskStatus(args);
|
|
857
1079
|
break;
|