@intangle/mcp-server 1.2.2 → 1.2.4

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 CHANGED
@@ -10,6 +10,7 @@ import { CallToolRequestSchema, ErrorCode, ListToolsRequestSchema, McpError, } f
10
10
  import { readFileSync } from "fs";
11
11
  import { fileURLToPath } from "url";
12
12
  import { dirname, join } from "path";
13
+ import { TOOLS } from "./tool-definitions.js";
13
14
  // Load environment variables from .env and .env.local
14
15
  config({ quiet: true });
15
16
  config({ path: ".env.local", quiet: true });
@@ -77,291 +78,6 @@ const server = new Server({
77
78
  tools: {},
78
79
  },
79
80
  });
80
- const TOOLS = [
81
- {
82
- name: "search_memories",
83
- description: "Search through ALL stored data including BOTH context (general information) AND tasks (actionable workflow items). Uses intelligent routing with query classification. Supports depth control for speed vs thoroughness tradeoff. ALWAYS provide space_id parameter - this is mandatory for all searches.",
84
- inputSchema: {
85
- type: "object",
86
- properties: {
87
- space_id: {
88
- type: "string",
89
- description: "REQUIRED: Space to search in (use list_spaces to see available options)",
90
- },
91
- query: {
92
- type: "string",
93
- description: "Search query for finding relevant memories",
94
- },
95
- topics: {
96
- type: "array",
97
- items: { type: "string" },
98
- description: "Filter by specific topics",
99
- },
100
- max_results: {
101
- type: "number",
102
- description: "Maximum number of results to return",
103
- default: 10,
104
- },
105
- depth: {
106
- type: "string",
107
- enum: ["quick", "balanced", "deep"],
108
- description: "Search depth: 'quick' = fast list retrieval, 'balanced' = smart routing with AI (default), 'deep' = full hybrid search with attention agent",
109
- default: "balanced",
110
- },
111
- return_format: {
112
- type: "string",
113
- enum: ["full", "summary", "ids_only"],
114
- description: "Result format: 'full' = complete content (default), 'summary' = truncated content, 'ids_only' = just IDs for subsequent fetch",
115
- default: "full",
116
- },
117
- },
118
- required: ["query"],
119
- },
120
- },
121
- {
122
- name: "fetch",
123
- description: "Fetch complete items (context or tasks) by ID. Accepts single ID or array of IDs. Returns BOTH context (Memory nodes) and tasks (Task nodes) with full content, topics, and metadata. Always returns full content (never summaries). Use this after getting summaries from search/list/start to retrieve full details for specific items.",
124
- inputSchema: {
125
- type: "object",
126
- properties: {
127
- id: {
128
- type: "string",
129
- description: "Single ID to fetch (context or task ID like 'mem_123' or 'task_456')",
130
- },
131
- ids: {
132
- type: "array",
133
- items: { type: "string" },
134
- description: "Array of IDs to fetch (mix of context and task IDs). Use this to fetch multiple items in one call.",
135
- },
136
- },
137
- },
138
- },
139
- {
140
- name: "list_spaces",
141
- 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).",
142
- inputSchema: {
143
- type: "object",
144
- properties: {},
145
- },
146
- },
147
- {
148
- name: "create_space",
149
- description: "Create a new space with optional configuration. Spaces are top-level containers that hold both context (general information) and tasks (actionable items). The 'start' tool loads this configuration when beginning work in this space. Checks user's plan limits and returns upgrade link if limit reached.",
150
- inputSchema: {
151
- type: "object",
152
- properties: {
153
- name: {
154
- type: "string",
155
- description: "Name for the space (e.g., 'Work', 'Personal', 'Project X')",
156
- },
157
- description: {
158
- type: "string",
159
- description: "Brief description of what this space is for (e.g., 'Work-related context and tasks')",
160
- },
161
- config_badges: {
162
- type: "array",
163
- items: { type: "string" },
164
- description: "Array of keywords for memory focus in this space. These keywords help steer what context gets loaded when running 'start' for this space. Examples: ['TypeScript', 'React', 'API design', 'authentication']. They act as search terms to prioritize relevant memories.",
165
- },
166
- startup_preferences: {
167
- type: "string",
168
- description: "AI behavior preferences for this space. Guides how AI assistants and agents should communicate and behave (e.g., 'be concise and frank', 'think critically', 'play devils advocate'). This appears in the start briefing under 'Assistant Preferences'.",
169
- },
170
- include_tasks: {
171
- type: "boolean",
172
- description: "Whether to automatically retrieve pending/in-progress tasks when running the 'start' tool for this space",
173
- default: false,
174
- },
175
- },
176
- required: ["name"],
177
- },
178
- },
179
- {
180
- name: "get_space_info",
181
- description: "Get detailed information about a specific space",
182
- inputSchema: {
183
- type: "object",
184
- properties: {
185
- space_id: {
186
- type: "string",
187
- description: "ID of space to get info for",
188
- },
189
- },
190
- required: ["space_id"],
191
- },
192
- },
193
- {
194
- name: "start",
195
- description: "Start working in a space and get comprehensive initialization. Returns static context, auto-searched context (general information), preferences, and optionally pending tasks. This tool retrieves BOTH context AND tasks based on space configuration. Call this when starting a conversation in a space to get relevant information.",
196
- inputSchema: {
197
- type: "object",
198
- properties: {
199
- space_id: {
200
- type: "string",
201
- description: "Space to start (e.g., 'renvoi', 'personal')",
202
- },
203
- },
204
- required: ["space_id"],
205
- },
206
- },
207
- {
208
- name: "update_memory",
209
- 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.\n\nIMPORTANT: Before using this tool, summarize your findings and proposed changes to get user confirmation UNLESS the user explicitly just asked you to add/update/delete memories.",
210
- inputSchema: {
211
- type: "object",
212
- properties: {
213
- space_id: {
214
- type: "string",
215
- description: "REQUIRED: Space to operate in (use list_spaces to see available options)",
216
- },
217
- add: {
218
- type: "object",
219
- description: "Add new context and/or tasks to memory",
220
- properties: {
221
- context: {
222
- type: "array",
223
- items: {
224
- type: "object",
225
- properties: {
226
- title: { type: "string", description: "Context title" },
227
- content: {
228
- type: "string",
229
- description: "Context content (general information)",
230
- },
231
- topics: {
232
- type: "array",
233
- items: { type: "string" },
234
- description: "Optional topics/tags",
235
- },
236
- },
237
- required: ["title", "content"],
238
- },
239
- description: "Array of context items to add",
240
- },
241
- tasks: {
242
- type: "array",
243
- items: {
244
- type: "object",
245
- properties: {
246
- title: { type: "string", description: "Task title" },
247
- content: { type: "string", description: "Task description" },
248
- topics: {
249
- type: "array",
250
- items: { type: "string" },
251
- description: "Optional topics/tags",
252
- },
253
- status: {
254
- type: "string",
255
- enum: [
256
- "pending",
257
- "in_progress",
258
- "completed",
259
- "invalidated",
260
- ],
261
- description: "Task status (default: pending)",
262
- },
263
- priority: {
264
- type: "string",
265
- enum: ["urgent", "high", "medium", "low"],
266
- description: "Priority level (default: medium)",
267
- },
268
- },
269
- required: ["title", "content"],
270
- },
271
- description: "Array of tasks to add",
272
- },
273
- },
274
- },
275
- update: {
276
- type: "object",
277
- description: "Update existing context and/or tasks",
278
- properties: {
279
- context: {
280
- type: "array",
281
- items: {
282
- type: "object",
283
- properties: {
284
- id: { type: "string", description: "Context ID to update" },
285
- title: {
286
- type: "string",
287
- description: "New title (optional)",
288
- },
289
- content: {
290
- type: "string",
291
- description: "New content (optional)",
292
- },
293
- topics: {
294
- type: "array",
295
- items: { type: "string" },
296
- description: "New topics (optional)",
297
- },
298
- },
299
- required: ["id"],
300
- },
301
- description: "Array of context updates (must include id)",
302
- },
303
- tasks: {
304
- type: "array",
305
- items: {
306
- type: "object",
307
- properties: {
308
- task_id: { type: "string", description: "Task ID to update" },
309
- title: {
310
- type: "string",
311
- description: "New title (optional)",
312
- },
313
- content: {
314
- type: "string",
315
- description: "New content (optional)",
316
- },
317
- topics: {
318
- type: "array",
319
- items: { type: "string" },
320
- description: "New topics (optional)",
321
- },
322
- status: {
323
- type: "string",
324
- enum: [
325
- "pending",
326
- "in_progress",
327
- "completed",
328
- "invalidated",
329
- ],
330
- description: "New status (optional)",
331
- },
332
- priority: {
333
- type: "string",
334
- enum: ["urgent", "high", "medium", "low"],
335
- description: "New priority (optional)",
336
- },
337
- },
338
- required: ["task_id"],
339
- },
340
- description: "Array of task updates (must include task_id)",
341
- },
342
- },
343
- },
344
- delete: {
345
- type: "object",
346
- description: "Delete context and/or tasks by ID",
347
- properties: {
348
- context_ids: {
349
- type: "array",
350
- items: { type: "string" },
351
- description: "Array of context IDs to delete",
352
- },
353
- task_ids: {
354
- type: "array",
355
- items: { type: "string" },
356
- description: "Array of task IDs to delete",
357
- },
358
- },
359
- },
360
- },
361
- required: ["space_id"],
362
- },
363
- },
364
- ];
365
81
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
366
82
  tools: TOOLS,
367
83
  }));
@@ -397,23 +113,23 @@ async function handleFetch(args) {
397
113
  const { id, ids } = args;
398
114
  return makeApiCall("fetch", { id, ids });
399
115
  }
400
- async function handleListSpaces() {
116
+ async function handleViewSpaces() {
401
117
  return makeApiCall("list-spaces", {});
402
118
  }
403
119
  async function handleCreateSpace(args) {
404
120
  return makeApiCall("create-space", args);
405
121
  }
406
- async function handleGetSpaceInfo(args) {
122
+ async function handleViewSpace(args) {
407
123
  const { space_id } = args;
408
- return makeApiCall("get-space-info", { space_id });
124
+ return makeApiCall("view-space", { space_id });
409
125
  }
410
126
  async function handleStart(args) {
411
127
  const { space_id } = args;
412
128
  return makeApiCall("start", { space_id });
413
129
  }
414
- async function handleUpdateMemory(args) {
130
+ async function handleUpdateSpace(args) {
415
131
  if (!args.space_id) {
416
- throw new Error("space_id is required. Use list_spaces to see available options.");
132
+ throw new Error("space_id is required. Use view_spaces to see available options.");
417
133
  }
418
134
  if (!args.add && !args.update && !args.delete) {
419
135
  throw new Error("At least one operation (add, update, delete) must be provided");
@@ -434,7 +150,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
434
150
  try {
435
151
  let result;
436
152
  switch (name) {
437
- case "search_memories":
153
+ case "search":
438
154
  result = await handleSearchMemories(args);
439
155
  break;
440
156
  case "get_recent_memories":
@@ -443,20 +159,20 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
443
159
  case "fetch":
444
160
  result = await handleFetch(args);
445
161
  break;
446
- case "list_spaces":
447
- result = await handleListSpaces();
162
+ case "view_spaces":
163
+ result = await handleViewSpaces();
448
164
  break;
449
165
  case "create_space":
450
166
  result = await handleCreateSpace(args);
451
167
  break;
452
- case "get_space_info":
453
- result = await handleGetSpaceInfo(args);
168
+ case "view_space":
169
+ result = await handleViewSpace(args);
454
170
  break;
455
171
  case "start":
456
172
  result = await handleStart(args);
457
173
  break;
458
- case "update_memory":
459
- result = await handleUpdateMemory(args);
174
+ case "update_space":
175
+ result = await handleUpdateSpace(args);
460
176
  break;
461
177
  case "list_tasks":
462
178
  result = await handleListTasks(args);
@@ -0,0 +1,282 @@
1
+ // Tools definition - matches the stdio server
2
+ export const TOOLS = [
3
+ {
4
+ name: "search",
5
+ title: "Search Space",
6
+ description: "Search for information within a space. Supports quick, balanced, and deep search modes.",
7
+ inputSchema: {
8
+ type: "object",
9
+ properties: {
10
+ query: {
11
+ type: "string",
12
+ description: "Search query for finding relevant memories",
13
+ },
14
+ space_id: {
15
+ type: "string",
16
+ description: "REQUIRED: Space to search in (use view_spaces to see available options)",
17
+ },
18
+ topics: {
19
+ type: "array",
20
+ items: { type: "string" },
21
+ description: "Optional: Filter by specific topics",
22
+ },
23
+ max_results: {
24
+ type: "number",
25
+ description: "Maximum number of results to return",
26
+ default: 10,
27
+ },
28
+ depth: {
29
+ type: "string",
30
+ enum: ["quick", "balanced", "deep"],
31
+ description: "Search depth: 'quick' = fastest, 'balanced' = thorough (default), 'deep' = most comprehensive",
32
+ default: "balanced",
33
+ },
34
+ },
35
+ required: ["query", "space_id"],
36
+ },
37
+ },
38
+ {
39
+ name: "fetch",
40
+ title: "Fetch Items by ID",
41
+ description: "Retrieve full content for specific items by ID. Accepts single ID or array of IDs.",
42
+ inputSchema: {
43
+ type: "object",
44
+ properties: {
45
+ id: {
46
+ type: "string",
47
+ description: "Single ID to fetch (context or task ID like 'mem_123' or 'task_456')",
48
+ },
49
+ ids: {
50
+ type: "array",
51
+ items: { type: "string" },
52
+ description: "Array of IDs to fetch (mix of context and task IDs). Use this to fetch multiple items in one call.",
53
+ },
54
+ },
55
+ },
56
+ },
57
+ {
58
+ name: "start",
59
+ title: "Start Space Session",
60
+ description: "Begin working in a space. Returns a dynamic briefing of recent developments and current priorities.",
61
+ inputSchema: {
62
+ type: "object",
63
+ properties: {
64
+ space_id: {
65
+ type: "string",
66
+ description: "Space to start (e.g., 'renvoi', 'personal')",
67
+ },
68
+ },
69
+ required: ["space_id"],
70
+ },
71
+ },
72
+ {
73
+ name: "view_spaces",
74
+ title: "View Spaces",
75
+ description: "View all available spaces with their descriptions and metrics.",
76
+ inputSchema: {
77
+ type: "object",
78
+ properties: {},
79
+ },
80
+ },
81
+ {
82
+ name: "create_space",
83
+ title: "Create Space",
84
+ description: "Create a new space with optional configuration.",
85
+ inputSchema: {
86
+ type: "object",
87
+ properties: {
88
+ name: {
89
+ type: "string",
90
+ description: "Name for the NEW space being created (e.g., 'Work', 'Personal', 'Project X')",
91
+ },
92
+ description: {
93
+ type: "string",
94
+ description: "Brief description of what this NEW space is for (e.g., 'Work-related context and tasks')",
95
+ },
96
+ config_badges: {
97
+ type: "array",
98
+ items: { type: "string" },
99
+ description: "Array of keywords for memory focus in this NEW space. These keywords help steer what context gets loaded when running 'start' for this space. Examples: ['fitness', 'recipes', 'travel planning'], ['client work', 'meetings', 'proposals'], ['TypeScript', 'React', 'API design']. They act as search terms to prioritize relevant memories.",
100
+ },
101
+ startup_preferences: {
102
+ type: "string",
103
+ description: "AI behavior preferences for this NEW space. Guides how AI assistants and agents should communicate and behave (e.g., 'be concise and frank', 'think critically', 'play devils advocate'). This appears in the start briefing under 'Assistant Preferences'.",
104
+ },
105
+ },
106
+ required: ["name"],
107
+ },
108
+ },
109
+ {
110
+ name: "view_space",
111
+ title: "View Space",
112
+ description: "View detailed information about a space including configuration and overview.",
113
+ inputSchema: {
114
+ type: "object",
115
+ properties: {
116
+ space_id: {
117
+ type: "string",
118
+ description: "ID of space to get info for",
119
+ },
120
+ },
121
+ required: ["space_id"],
122
+ },
123
+ },
124
+ {
125
+ name: "update_space",
126
+ title: "Update Space",
127
+ description: "Add, update, or delete items in a space. Supports any combination of operations in a single call.",
128
+ inputSchema: {
129
+ type: "object",
130
+ properties: {
131
+ space_id: {
132
+ type: "string",
133
+ description: "REQUIRED: Space to operate in (use view_spaces to see available options)",
134
+ },
135
+ add: {
136
+ type: "object",
137
+ description: "Add new context and/or tasks to memory",
138
+ properties: {
139
+ context: {
140
+ type: "array",
141
+ items: {
142
+ type: "object",
143
+ properties: {
144
+ title: { type: "string", description: "Context title" },
145
+ content: {
146
+ type: "string",
147
+ description: "Context content (general information)",
148
+ },
149
+ topics: {
150
+ type: "array",
151
+ items: { type: "string" },
152
+ description: "Optional topics/tags",
153
+ },
154
+ },
155
+ required: ["title", "content"],
156
+ },
157
+ description: "Array of context items to add",
158
+ },
159
+ tasks: {
160
+ type: "array",
161
+ items: {
162
+ type: "object",
163
+ properties: {
164
+ title: { type: "string", description: "Task title" },
165
+ content: { type: "string", description: "Task description" },
166
+ topics: {
167
+ type: "array",
168
+ items: { type: "string" },
169
+ description: "Optional topics/tags",
170
+ },
171
+ status: {
172
+ type: "string",
173
+ enum: [
174
+ "pending",
175
+ "in_progress",
176
+ "completed",
177
+ "invalidated",
178
+ ],
179
+ description: "Task status (default: pending)",
180
+ },
181
+ priority: {
182
+ type: "string",
183
+ enum: ["urgent", "high", "medium", "low"],
184
+ description: "Priority level (default: medium)",
185
+ },
186
+ },
187
+ required: ["title", "content"],
188
+ },
189
+ description: "Array of tasks to add",
190
+ },
191
+ },
192
+ },
193
+ update: {
194
+ type: "object",
195
+ description: "Update existing context and/or tasks",
196
+ properties: {
197
+ context: {
198
+ type: "array",
199
+ items: {
200
+ type: "object",
201
+ properties: {
202
+ id: { type: "string", description: "Context ID to update" },
203
+ title: {
204
+ type: "string",
205
+ description: "New title (optional)",
206
+ },
207
+ content: {
208
+ type: "string",
209
+ description: "New content (optional)",
210
+ },
211
+ topics: {
212
+ type: "array",
213
+ items: { type: "string" },
214
+ description: "New topics (optional)",
215
+ },
216
+ },
217
+ required: ["id"],
218
+ },
219
+ description: "Array of context updates (must include id)",
220
+ },
221
+ tasks: {
222
+ type: "array",
223
+ items: {
224
+ type: "object",
225
+ properties: {
226
+ task_id: { type: "string", description: "Task ID to update" },
227
+ title: {
228
+ type: "string",
229
+ description: "New title (optional)",
230
+ },
231
+ content: {
232
+ type: "string",
233
+ description: "New content (optional)",
234
+ },
235
+ topics: {
236
+ type: "array",
237
+ items: { type: "string" },
238
+ description: "New topics (optional)",
239
+ },
240
+ status: {
241
+ type: "string",
242
+ enum: [
243
+ "pending",
244
+ "in_progress",
245
+ "completed",
246
+ "invalidated",
247
+ ],
248
+ description: "New status (optional)",
249
+ },
250
+ priority: {
251
+ type: "string",
252
+ enum: ["urgent", "high", "medium", "low"],
253
+ description: "New priority (optional)",
254
+ },
255
+ },
256
+ required: ["task_id"],
257
+ },
258
+ description: "Array of task updates (must include task_id)",
259
+ },
260
+ },
261
+ },
262
+ delete: {
263
+ type: "object",
264
+ description: "Delete context and/or tasks by ID",
265
+ properties: {
266
+ context_ids: {
267
+ type: "array",
268
+ items: { type: "string" },
269
+ description: "Array of context IDs to delete",
270
+ },
271
+ task_ids: {
272
+ type: "array",
273
+ items: { type: "string" },
274
+ description: "Array of task IDs to delete",
275
+ },
276
+ },
277
+ },
278
+ },
279
+ required: ["space_id"],
280
+ },
281
+ },
282
+ ];
package/index.ts CHANGED
@@ -17,6 +17,7 @@ import {
17
17
  import { readFileSync } from "fs";
18
18
  import { fileURLToPath } from "url";
19
19
  import { dirname, join } from "path";
20
+ import { TOOLS } from "./tool-definitions.js";
20
21
 
21
22
  // Load environment variables from .env and .env.local
22
23
  config({ quiet: true });
@@ -107,309 +108,6 @@ const server = new Server(
107
108
  },
108
109
  );
109
110
 
110
- const TOOLS = [
111
- {
112
- name: "search_memories",
113
- description:
114
- "Search through ALL stored data including BOTH context (general information) AND tasks (actionable workflow items). Uses intelligent routing with query classification. Supports depth control for speed vs thoroughness tradeoff. ALWAYS provide space_id parameter - this is mandatory for all searches.",
115
- inputSchema: {
116
- type: "object",
117
- properties: {
118
- space_id: {
119
- type: "string",
120
- description:
121
- "REQUIRED: Space to search in (use list_spaces to see available options)",
122
- },
123
- query: {
124
- type: "string",
125
- description: "Search query for finding relevant memories",
126
- },
127
- topics: {
128
- type: "array",
129
- items: { type: "string" },
130
- description: "Filter by specific topics",
131
- },
132
- max_results: {
133
- type: "number",
134
- description: "Maximum number of results to return",
135
- default: 10,
136
- },
137
- depth: {
138
- type: "string",
139
- enum: ["quick", "balanced", "deep"],
140
- description:
141
- "Search depth: 'quick' = fast list retrieval, 'balanced' = smart routing with AI (default), 'deep' = full hybrid search with attention agent",
142
- default: "balanced",
143
- },
144
- return_format: {
145
- type: "string",
146
- enum: ["full", "summary", "ids_only"],
147
- description:
148
- "Result format: 'full' = complete content (default), 'summary' = truncated content, 'ids_only' = just IDs for subsequent fetch",
149
- default: "full",
150
- },
151
- },
152
- required: ["query"],
153
- },
154
- },
155
- {
156
- name: "fetch",
157
- description:
158
- "Fetch complete items (context or tasks) by ID. Accepts single ID or array of IDs. Returns BOTH context (Memory nodes) and tasks (Task nodes) with full content, topics, and metadata. Always returns full content (never summaries). Use this after getting summaries from search/list/start to retrieve full details for specific items.",
159
- inputSchema: {
160
- type: "object",
161
- properties: {
162
- id: {
163
- type: "string",
164
- description:
165
- "Single ID to fetch (context or task ID like 'mem_123' or 'task_456')",
166
- },
167
- ids: {
168
- type: "array",
169
- items: { type: "string" },
170
- description:
171
- "Array of IDs to fetch (mix of context and task IDs). Use this to fetch multiple items in one call.",
172
- },
173
- },
174
- },
175
- },
176
- {
177
- name: "list_spaces",
178
- description:
179
- "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).",
180
- inputSchema: {
181
- type: "object",
182
- properties: {},
183
- },
184
- },
185
- {
186
- name: "create_space",
187
- description:
188
- "Create a new space with optional configuration. Spaces are top-level containers that hold both context (general information) and tasks (actionable items). The 'start' tool loads this configuration when beginning work in this space. Checks user's plan limits and returns upgrade link if limit reached.",
189
- inputSchema: {
190
- type: "object",
191
- properties: {
192
- name: {
193
- type: "string",
194
- description:
195
- "Name for the space (e.g., 'Work', 'Personal', 'Project X')",
196
- },
197
- description: {
198
- type: "string",
199
- description:
200
- "Brief description of what this space is for (e.g., 'Work-related context and tasks')",
201
- },
202
- config_badges: {
203
- type: "array",
204
- items: { type: "string" },
205
- description:
206
- "Array of keywords for memory focus in this space. These keywords help steer what context gets loaded when running 'start' for this space. Examples: ['TypeScript', 'React', 'API design', 'authentication']. They act as search terms to prioritize relevant memories.",
207
- },
208
- startup_preferences: {
209
- type: "string",
210
- description:
211
- "AI behavior preferences for this space. Guides how AI assistants and agents should communicate and behave (e.g., 'be concise and frank', 'think critically', 'play devils advocate'). This appears in the start briefing under 'Assistant Preferences'.",
212
- },
213
- include_tasks: {
214
- type: "boolean",
215
- description:
216
- "Whether to automatically retrieve pending/in-progress tasks when running the 'start' tool for this space",
217
- default: false,
218
- },
219
- },
220
- required: ["name"],
221
- },
222
- },
223
- {
224
- name: "get_space_info",
225
- description: "Get detailed information about a specific space",
226
- inputSchema: {
227
- type: "object",
228
- properties: {
229
- space_id: {
230
- type: "string",
231
- description: "ID of space to get info for",
232
- },
233
- },
234
- required: ["space_id"],
235
- },
236
- },
237
- {
238
- name: "start",
239
- description:
240
- "Start working in a space and get comprehensive initialization. Returns static context, auto-searched context (general information), preferences, and optionally pending tasks. This tool retrieves BOTH context AND tasks based on space configuration. Call this when starting a conversation in a space to get relevant information.",
241
- inputSchema: {
242
- type: "object",
243
- properties: {
244
- space_id: {
245
- type: "string",
246
- description: "Space to start (e.g., 'renvoi', 'personal')",
247
- },
248
- },
249
- required: ["space_id"],
250
- },
251
- },
252
- {
253
- name: "update_memory",
254
- description:
255
- "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.\n\nIMPORTANT: Before using this tool, summarize your findings and proposed changes to get user confirmation UNLESS the user explicitly just asked you to add/update/delete memories.",
256
- inputSchema: {
257
- type: "object",
258
- properties: {
259
- space_id: {
260
- type: "string",
261
- description:
262
- "REQUIRED: Space to operate in (use list_spaces to see available options)",
263
- },
264
- add: {
265
- type: "object",
266
- description: "Add new context and/or tasks to memory",
267
- properties: {
268
- context: {
269
- type: "array",
270
- items: {
271
- type: "object",
272
- properties: {
273
- title: { type: "string", description: "Context title" },
274
- content: {
275
- type: "string",
276
- description: "Context content (general information)",
277
- },
278
- topics: {
279
- type: "array",
280
- items: { type: "string" },
281
- description: "Optional topics/tags",
282
- },
283
- },
284
- required: ["title", "content"],
285
- },
286
- description: "Array of context items to add",
287
- },
288
- tasks: {
289
- type: "array",
290
- items: {
291
- type: "object",
292
- properties: {
293
- title: { type: "string", description: "Task title" },
294
- content: { type: "string", description: "Task description" },
295
- topics: {
296
- type: "array",
297
- items: { type: "string" },
298
- description: "Optional topics/tags",
299
- },
300
- status: {
301
- type: "string",
302
- enum: [
303
- "pending",
304
- "in_progress",
305
- "completed",
306
- "invalidated",
307
- ],
308
- description: "Task status (default: pending)",
309
- },
310
- priority: {
311
- type: "string",
312
- enum: ["urgent", "high", "medium", "low"],
313
- description: "Priority level (default: medium)",
314
- },
315
- },
316
- required: ["title", "content"],
317
- },
318
- description: "Array of tasks to add",
319
- },
320
- },
321
- },
322
- update: {
323
- type: "object",
324
- description: "Update existing context and/or tasks",
325
- properties: {
326
- context: {
327
- type: "array",
328
- items: {
329
- type: "object",
330
- properties: {
331
- id: { type: "string", description: "Context ID to update" },
332
- title: {
333
- type: "string",
334
- description: "New title (optional)",
335
- },
336
- content: {
337
- type: "string",
338
- description: "New content (optional)",
339
- },
340
- topics: {
341
- type: "array",
342
- items: { type: "string" },
343
- description: "New topics (optional)",
344
- },
345
- },
346
- required: ["id"],
347
- },
348
- description: "Array of context updates (must include id)",
349
- },
350
- tasks: {
351
- type: "array",
352
- items: {
353
- type: "object",
354
- properties: {
355
- task_id: { type: "string", description: "Task ID to update" },
356
- title: {
357
- type: "string",
358
- description: "New title (optional)",
359
- },
360
- content: {
361
- type: "string",
362
- description: "New content (optional)",
363
- },
364
- topics: {
365
- type: "array",
366
- items: { type: "string" },
367
- description: "New topics (optional)",
368
- },
369
- status: {
370
- type: "string",
371
- enum: [
372
- "pending",
373
- "in_progress",
374
- "completed",
375
- "invalidated",
376
- ],
377
- description: "New status (optional)",
378
- },
379
- priority: {
380
- type: "string",
381
- enum: ["urgent", "high", "medium", "low"],
382
- description: "New priority (optional)",
383
- },
384
- },
385
- required: ["task_id"],
386
- },
387
- description: "Array of task updates (must include task_id)",
388
- },
389
- },
390
- },
391
- delete: {
392
- type: "object",
393
- description: "Delete context and/or tasks by ID",
394
- properties: {
395
- context_ids: {
396
- type: "array",
397
- items: { type: "string" },
398
- description: "Array of context IDs to delete",
399
- },
400
- task_ids: {
401
- type: "array",
402
- items: { type: "string" },
403
- description: "Array of task IDs to delete",
404
- },
405
- },
406
- },
407
- },
408
- required: ["space_id"],
409
- },
410
- },
411
- ];
412
-
413
111
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
414
112
  tools: TOOLS,
415
113
  }));
@@ -480,7 +178,7 @@ async function handleFetch(args: any) {
480
178
  return makeApiCall("fetch", { id, ids });
481
179
  }
482
180
 
483
- async function handleListSpaces() {
181
+ async function handleViewSpaces() {
484
182
  return makeApiCall("list-spaces", {});
485
183
  }
486
184
 
@@ -488,9 +186,9 @@ async function handleCreateSpace(args: any) {
488
186
  return makeApiCall("create-space", args);
489
187
  }
490
188
 
491
- async function handleGetSpaceInfo(args: any) {
189
+ async function handleViewSpace(args: any) {
492
190
  const { space_id } = args as { space_id: string };
493
- return makeApiCall("get-space-info", { space_id });
191
+ return makeApiCall("view-space", { space_id });
494
192
  }
495
193
 
496
194
  async function handleStart(args: any) {
@@ -498,10 +196,10 @@ async function handleStart(args: any) {
498
196
  return makeApiCall("start", { space_id });
499
197
  }
500
198
 
501
- async function handleUpdateMemory(args: any) {
199
+ async function handleUpdateSpace(args: any) {
502
200
  if (!args.space_id) {
503
201
  throw new Error(
504
- "space_id is required. Use list_spaces to see available options.",
202
+ "space_id is required. Use view_spaces to see available options.",
505
203
  );
506
204
  }
507
205
 
@@ -531,7 +229,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
531
229
  let result: any;
532
230
 
533
231
  switch (name) {
534
- case "search_memories":
232
+ case "search":
535
233
  result = await handleSearchMemories(args);
536
234
  break;
537
235
  case "get_recent_memories":
@@ -540,20 +238,20 @@ server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
540
238
  case "fetch":
541
239
  result = await handleFetch(args);
542
240
  break;
543
- case "list_spaces":
544
- result = await handleListSpaces();
241
+ case "view_spaces":
242
+ result = await handleViewSpaces();
545
243
  break;
546
244
  case "create_space":
547
245
  result = await handleCreateSpace(args);
548
246
  break;
549
- case "get_space_info":
550
- result = await handleGetSpaceInfo(args);
247
+ case "view_space":
248
+ result = await handleViewSpace(args);
551
249
  break;
552
250
  case "start":
553
251
  result = await handleStart(args);
554
252
  break;
555
- case "update_memory":
556
- result = await handleUpdateMemory(args);
253
+ case "update_space":
254
+ result = await handleUpdateSpace(args);
557
255
  break;
558
256
  case "list_tasks":
559
257
  result = await handleListTasks(args);
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@intangle/mcp-server",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "Model Context Protocol server for Intangle - AI memory that persists across conversations",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "start": "node dist/index.js",
9
9
  "dev": "tsx watch index.ts",
10
+ "prebuild": "cp ../web/src/app/api/mcp-remote/tool-definitions.ts ./tool-definitions.ts",
10
11
  "build": "tsc",
11
12
  "lint": "biome check .",
12
13
  "lint:fix": "biome check --fix .",
@@ -0,0 +1,296 @@
1
+ // Tools definition - matches the stdio server
2
+ export const TOOLS = [
3
+ {
4
+ name: "search",
5
+ title: "Search Space",
6
+ description:
7
+ "Search for information within a space. Supports quick, balanced, and deep search modes.",
8
+ inputSchema: {
9
+ type: "object",
10
+ properties: {
11
+ query: {
12
+ type: "string",
13
+ description: "Search query for finding relevant memories",
14
+ },
15
+ space_id: {
16
+ type: "string",
17
+ description:
18
+ "REQUIRED: Space to search in (use view_spaces to see available options)",
19
+ },
20
+ topics: {
21
+ type: "array",
22
+ items: { type: "string" },
23
+ description: "Optional: Filter by specific topics",
24
+ },
25
+ max_results: {
26
+ type: "number",
27
+ description: "Maximum number of results to return",
28
+ default: 10,
29
+ },
30
+ depth: {
31
+ type: "string",
32
+ enum: ["quick", "balanced", "deep"],
33
+ description:
34
+ "Search depth: 'quick' = fastest, 'balanced' = thorough (default), 'deep' = most comprehensive",
35
+ default: "balanced",
36
+ },
37
+ },
38
+ required: ["query", "space_id"],
39
+ },
40
+ },
41
+ {
42
+ name: "fetch",
43
+ title: "Fetch Items by ID",
44
+ description:
45
+ "Retrieve full content for specific items by ID. Accepts single ID or array of IDs.",
46
+ inputSchema: {
47
+ type: "object",
48
+ properties: {
49
+ id: {
50
+ type: "string",
51
+ description:
52
+ "Single ID to fetch (context or task ID like 'mem_123' or 'task_456')",
53
+ },
54
+ ids: {
55
+ type: "array",
56
+ items: { type: "string" },
57
+ description:
58
+ "Array of IDs to fetch (mix of context and task IDs). Use this to fetch multiple items in one call.",
59
+ },
60
+ },
61
+ },
62
+ },
63
+ {
64
+ name: "start",
65
+ title: "Start Space Session",
66
+ description:
67
+ "Begin working in a space. Returns a dynamic briefing of recent developments and current priorities.",
68
+ inputSchema: {
69
+ type: "object",
70
+ properties: {
71
+ space_id: {
72
+ type: "string",
73
+ description: "Space to start (e.g., 'renvoi', 'personal')",
74
+ },
75
+ },
76
+ required: ["space_id"],
77
+ },
78
+ },
79
+ {
80
+ name: "view_spaces",
81
+ title: "View Spaces",
82
+ description: "View all available spaces with their descriptions and metrics.",
83
+ inputSchema: {
84
+ type: "object",
85
+ properties: {},
86
+ },
87
+ },
88
+ {
89
+ name: "create_space",
90
+ title: "Create Space",
91
+ description: "Create a new space with optional configuration.",
92
+ inputSchema: {
93
+ type: "object",
94
+ properties: {
95
+ name: {
96
+ type: "string",
97
+ description:
98
+ "Name for the NEW space being created (e.g., 'Work', 'Personal', 'Project X')",
99
+ },
100
+ description: {
101
+ type: "string",
102
+ description:
103
+ "Brief description of what this NEW space is for (e.g., 'Work-related context and tasks')",
104
+ },
105
+ config_badges: {
106
+ type: "array",
107
+ items: { type: "string" },
108
+ description:
109
+ "Array of keywords for memory focus in this NEW space. These keywords help steer what context gets loaded when running 'start' for this space. Examples: ['fitness', 'recipes', 'travel planning'], ['client work', 'meetings', 'proposals'], ['TypeScript', 'React', 'API design']. They act as search terms to prioritize relevant memories.",
110
+ },
111
+ startup_preferences: {
112
+ type: "string",
113
+ description:
114
+ "AI behavior preferences for this NEW space. Guides how AI assistants and agents should communicate and behave (e.g., 'be concise and frank', 'think critically', 'play devils advocate'). This appears in the start briefing under 'Assistant Preferences'.",
115
+ },
116
+ },
117
+ required: ["name"],
118
+ },
119
+ },
120
+ {
121
+ name: "view_space",
122
+ title: "View Space",
123
+ description:
124
+ "View detailed information about a space including configuration and overview.",
125
+ inputSchema: {
126
+ type: "object",
127
+ properties: {
128
+ space_id: {
129
+ type: "string",
130
+ description: "ID of space to get info for",
131
+ },
132
+ },
133
+ required: ["space_id"],
134
+ },
135
+ },
136
+ {
137
+ name: "update_space",
138
+ title: "Update Space",
139
+ description:
140
+ "Add, update, or delete items in a space. Supports any combination of operations in a single call.",
141
+ inputSchema: {
142
+ type: "object",
143
+ properties: {
144
+ space_id: {
145
+ type: "string",
146
+ description:
147
+ "REQUIRED: Space to operate in (use view_spaces to see available options)",
148
+ },
149
+ add: {
150
+ type: "object",
151
+ description: "Add new context and/or tasks to memory",
152
+ properties: {
153
+ context: {
154
+ type: "array",
155
+ items: {
156
+ type: "object",
157
+ properties: {
158
+ title: { type: "string", description: "Context title" },
159
+ content: {
160
+ type: "string",
161
+ description: "Context content (general information)",
162
+ },
163
+ topics: {
164
+ type: "array",
165
+ items: { type: "string" },
166
+ description: "Optional topics/tags",
167
+ },
168
+ },
169
+ required: ["title", "content"],
170
+ },
171
+ description: "Array of context items to add",
172
+ },
173
+ tasks: {
174
+ type: "array",
175
+ items: {
176
+ type: "object",
177
+ properties: {
178
+ title: { type: "string", description: "Task title" },
179
+ content: { type: "string", description: "Task description" },
180
+ topics: {
181
+ type: "array",
182
+ items: { type: "string" },
183
+ description: "Optional topics/tags",
184
+ },
185
+ status: {
186
+ type: "string",
187
+ enum: [
188
+ "pending",
189
+ "in_progress",
190
+ "completed",
191
+ "invalidated",
192
+ ],
193
+ description: "Task status (default: pending)",
194
+ },
195
+ priority: {
196
+ type: "string",
197
+ enum: ["urgent", "high", "medium", "low"],
198
+ description: "Priority level (default: medium)",
199
+ },
200
+ },
201
+ required: ["title", "content"],
202
+ },
203
+ description: "Array of tasks to add",
204
+ },
205
+ },
206
+ },
207
+ update: {
208
+ type: "object",
209
+ description: "Update existing context and/or tasks",
210
+ properties: {
211
+ context: {
212
+ type: "array",
213
+ items: {
214
+ type: "object",
215
+ properties: {
216
+ id: { type: "string", description: "Context ID to update" },
217
+ title: {
218
+ type: "string",
219
+ description: "New title (optional)",
220
+ },
221
+ content: {
222
+ type: "string",
223
+ description: "New content (optional)",
224
+ },
225
+ topics: {
226
+ type: "array",
227
+ items: { type: "string" },
228
+ description: "New topics (optional)",
229
+ },
230
+ },
231
+ required: ["id"],
232
+ },
233
+ description: "Array of context updates (must include id)",
234
+ },
235
+ tasks: {
236
+ type: "array",
237
+ items: {
238
+ type: "object",
239
+ properties: {
240
+ task_id: { type: "string", description: "Task ID to update" },
241
+ title: {
242
+ type: "string",
243
+ description: "New title (optional)",
244
+ },
245
+ content: {
246
+ type: "string",
247
+ description: "New content (optional)",
248
+ },
249
+ topics: {
250
+ type: "array",
251
+ items: { type: "string" },
252
+ description: "New topics (optional)",
253
+ },
254
+ status: {
255
+ type: "string",
256
+ enum: [
257
+ "pending",
258
+ "in_progress",
259
+ "completed",
260
+ "invalidated",
261
+ ],
262
+ description: "New status (optional)",
263
+ },
264
+ priority: {
265
+ type: "string",
266
+ enum: ["urgent", "high", "medium", "low"],
267
+ description: "New priority (optional)",
268
+ },
269
+ },
270
+ required: ["task_id"],
271
+ },
272
+ description: "Array of task updates (must include task_id)",
273
+ },
274
+ },
275
+ },
276
+ delete: {
277
+ type: "object",
278
+ description: "Delete context and/or tasks by ID",
279
+ properties: {
280
+ context_ids: {
281
+ type: "array",
282
+ items: { type: "string" },
283
+ description: "Array of context IDs to delete",
284
+ },
285
+ task_ids: {
286
+ type: "array",
287
+ items: { type: "string" },
288
+ description: "Array of task IDs to delete",
289
+ },
290
+ },
291
+ },
292
+ },
293
+ required: ["space_id"],
294
+ },
295
+ },
296
+ ];