@intangle/mcp-server 1.2.1 → 1.2.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/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,364 +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: "get_recent_memories",
157
- description:
158
- "Get the most recent CONTEXT items (general information). For recent tasks, use list_tasks instead. NOTE: This tool is called 'get_recent_memories' (not 'fetch'). Returns fully decrypted data. REQUIRES space_id parameter.",
159
- inputSchema: {
160
- type: "object",
161
- properties: {
162
- space_id: {
163
- type: "string",
164
- description:
165
- "REQUIRED: Space to get memories from (use list_spaces to see available options)",
166
- },
167
- topics: {
168
- type: "array",
169
- items: { type: "string" },
170
- description: "Filter by specific topics",
171
- },
172
- limit: {
173
- type: "number",
174
- description: "Number of recent memories to retrieve",
175
- default: 20,
176
- },
177
- },
178
- required: ["space_id"],
179
- },
180
- },
181
- {
182
- name: "fetch",
183
- description:
184
- "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.",
185
- inputSchema: {
186
- type: "object",
187
- properties: {
188
- id: {
189
- type: "string",
190
- description:
191
- "Single ID to fetch (context or task ID like 'mem_123' or 'task_456')",
192
- },
193
- ids: {
194
- type: "array",
195
- items: { type: "string" },
196
- description:
197
- "Array of IDs to fetch (mix of context and task IDs). Use this to fetch multiple items in one call.",
198
- },
199
- },
200
- },
201
- },
202
- {
203
- name: "list_spaces",
204
- description:
205
- "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).",
206
- inputSchema: {
207
- type: "object",
208
- properties: {},
209
- },
210
- },
211
- {
212
- name: "create_space",
213
- description:
214
- "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.",
215
- inputSchema: {
216
- type: "object",
217
- properties: {
218
- name: {
219
- type: "string",
220
- description:
221
- "Name for the space (e.g., 'Work', 'Personal', 'Project X')",
222
- },
223
- description: {
224
- type: "string",
225
- description:
226
- "Brief description of what this space is for (e.g., 'Work-related context and tasks')",
227
- },
228
- config_badges: {
229
- type: "array",
230
- items: { type: "string" },
231
- description:
232
- "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.",
233
- },
234
- startup_preferences: {
235
- type: "string",
236
- description:
237
- "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'.",
238
- },
239
- include_tasks: {
240
- type: "boolean",
241
- description:
242
- "Whether to automatically retrieve pending/in-progress tasks when running the 'start' tool for this space",
243
- default: false,
244
- },
245
- },
246
- required: ["name"],
247
- },
248
- },
249
- {
250
- name: "get_space_info",
251
- description: "Get detailed information about a specific space",
252
- inputSchema: {
253
- type: "object",
254
- properties: {
255
- space_id: {
256
- type: "string",
257
- description: "ID of space to get info for",
258
- },
259
- },
260
- required: ["space_id"],
261
- },
262
- },
263
- {
264
- name: "start",
265
- description:
266
- "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.",
267
- inputSchema: {
268
- type: "object",
269
- properties: {
270
- space_id: {
271
- type: "string",
272
- description: "Space to start (e.g., 'renvoi', 'personal')",
273
- },
274
- },
275
- required: ["space_id"],
276
- },
277
- },
278
- {
279
- name: "update_memory",
280
- description:
281
- "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.",
282
- inputSchema: {
283
- type: "object",
284
- properties: {
285
- space_id: {
286
- type: "string",
287
- description:
288
- "REQUIRED: Space to operate in (use list_spaces to see available options)",
289
- },
290
- add: {
291
- type: "object",
292
- description: "Add new context and/or tasks to memory",
293
- properties: {
294
- context: {
295
- type: "array",
296
- items: {
297
- type: "object",
298
- properties: {
299
- title: { type: "string", description: "Context title" },
300
- content: {
301
- type: "string",
302
- description: "Context content (general information)",
303
- },
304
- topics: {
305
- type: "array",
306
- items: { type: "string" },
307
- description: "Optional topics/tags",
308
- },
309
- },
310
- required: ["title", "content"],
311
- },
312
- description: "Array of context items to add",
313
- },
314
- tasks: {
315
- type: "array",
316
- items: {
317
- type: "object",
318
- properties: {
319
- title: { type: "string", description: "Task title" },
320
- content: { type: "string", description: "Task description" },
321
- topics: {
322
- type: "array",
323
- items: { type: "string" },
324
- description: "Optional topics/tags",
325
- },
326
- status: {
327
- type: "string",
328
- enum: [
329
- "pending",
330
- "in_progress",
331
- "completed",
332
- "invalidated",
333
- ],
334
- description: "Task status (default: pending)",
335
- },
336
- priority: {
337
- type: "string",
338
- enum: ["urgent", "high", "medium", "low"],
339
- description: "Priority level (default: medium)",
340
- },
341
- },
342
- required: ["title", "content"],
343
- },
344
- description: "Array of tasks to add",
345
- },
346
- },
347
- },
348
- update: {
349
- type: "object",
350
- description: "Update existing context and/or tasks",
351
- properties: {
352
- context: {
353
- type: "array",
354
- items: {
355
- type: "object",
356
- properties: {
357
- id: { type: "string", description: "Context ID to update" },
358
- title: {
359
- type: "string",
360
- description: "New title (optional)",
361
- },
362
- content: {
363
- type: "string",
364
- description: "New content (optional)",
365
- },
366
- topics: {
367
- type: "array",
368
- items: { type: "string" },
369
- description: "New topics (optional)",
370
- },
371
- },
372
- required: ["id"],
373
- },
374
- description: "Array of context updates (must include id)",
375
- },
376
- tasks: {
377
- type: "array",
378
- items: {
379
- type: "object",
380
- properties: {
381
- task_id: { type: "string", description: "Task ID to update" },
382
- title: {
383
- type: "string",
384
- description: "New title (optional)",
385
- },
386
- content: {
387
- type: "string",
388
- description: "New content (optional)",
389
- },
390
- topics: {
391
- type: "array",
392
- items: { type: "string" },
393
- description: "New topics (optional)",
394
- },
395
- status: {
396
- type: "string",
397
- enum: [
398
- "pending",
399
- "in_progress",
400
- "completed",
401
- "invalidated",
402
- ],
403
- description: "New status (optional)",
404
- },
405
- priority: {
406
- type: "string",
407
- enum: ["urgent", "high", "medium", "low"],
408
- description: "New priority (optional)",
409
- },
410
- },
411
- required: ["task_id"],
412
- },
413
- description: "Array of task updates (must include task_id)",
414
- },
415
- },
416
- },
417
- delete: {
418
- type: "object",
419
- description: "Delete context and/or tasks by ID",
420
- properties: {
421
- context_ids: {
422
- type: "array",
423
- items: { type: "string" },
424
- description: "Array of context IDs to delete",
425
- },
426
- task_ids: {
427
- type: "array",
428
- items: { type: "string" },
429
- description: "Array of task IDs to delete",
430
- },
431
- },
432
- },
433
- },
434
- required: ["space_id"],
435
- },
436
- },
437
- {
438
- name: "list_tasks",
439
- description: "List tasks in a space with optional filtering",
440
- inputSchema: {
441
- type: "object",
442
- properties: {
443
- space_id: {
444
- type: "string",
445
- description: "Space to list tasks from",
446
- },
447
- status: {
448
- type: "string",
449
- enum: ["pending", "in_progress", "completed", "invalidated"],
450
- description: "Optional: Filter by status",
451
- },
452
- topics: {
453
- type: "array",
454
- items: { type: "string" },
455
- description: "Optional: Filter by topics",
456
- },
457
- limit: {
458
- type: "number",
459
- description: "Maximum number of tasks to return",
460
- default: 50,
461
- },
462
- },
463
- required: ["space_id"],
464
- },
465
- },
466
- ];
467
-
468
111
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
469
112
  tools: TOOLS,
470
113
  }));
@@ -535,7 +178,7 @@ async function handleFetch(args: any) {
535
178
  return makeApiCall("fetch", { id, ids });
536
179
  }
537
180
 
538
- async function handleListSpaces() {
181
+ async function handleViewSpaces() {
539
182
  return makeApiCall("list-spaces", {});
540
183
  }
541
184
 
@@ -543,9 +186,9 @@ async function handleCreateSpace(args: any) {
543
186
  return makeApiCall("create-space", args);
544
187
  }
545
188
 
546
- async function handleGetSpaceInfo(args: any) {
189
+ async function handleViewSpace(args: any) {
547
190
  const { space_id } = args as { space_id: string };
548
- return makeApiCall("get-space-info", { space_id });
191
+ return makeApiCall("view-space", { space_id });
549
192
  }
550
193
 
551
194
  async function handleStart(args: any) {
@@ -553,10 +196,10 @@ async function handleStart(args: any) {
553
196
  return makeApiCall("start", { space_id });
554
197
  }
555
198
 
556
- async function handleUpdateMemory(args: any) {
199
+ async function handleUpdateSpace(args: any) {
557
200
  if (!args.space_id) {
558
201
  throw new Error(
559
- "space_id is required. Use list_spaces to see available options.",
202
+ "space_id is required. Use view_spaces to see available options.",
560
203
  );
561
204
  }
562
205
 
@@ -586,7 +229,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
586
229
  let result: any;
587
230
 
588
231
  switch (name) {
589
- case "search_memories":
232
+ case "search":
590
233
  result = await handleSearchMemories(args);
591
234
  break;
592
235
  case "get_recent_memories":
@@ -595,20 +238,20 @@ server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
595
238
  case "fetch":
596
239
  result = await handleFetch(args);
597
240
  break;
598
- case "list_spaces":
599
- result = await handleListSpaces();
241
+ case "view_spaces":
242
+ result = await handleViewSpaces();
600
243
  break;
601
244
  case "create_space":
602
245
  result = await handleCreateSpace(args);
603
246
  break;
604
- case "get_space_info":
605
- result = await handleGetSpaceInfo(args);
247
+ case "view_space":
248
+ result = await handleViewSpace(args);
606
249
  break;
607
250
  case "start":
608
251
  result = await handleStart(args);
609
252
  break;
610
- case "update_memory":
611
- result = await handleUpdateMemory(args);
253
+ case "update_space":
254
+ result = await handleUpdateSpace(args);
612
255
  break;
613
256
  case "list_tasks":
614
257
  result = await handleListTasks(args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intangle/mcp-server",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
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",