@intangle/mcp-server 2.3.8 → 2.4.0

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
@@ -196,6 +196,20 @@ try {
196
196
  unlink: args.unlink,
197
197
  });
198
198
  }
199
+ async function handleMessage(args) {
200
+ if (!args.type || !args.content) {
201
+ throw new Error("type and content are required");
202
+ }
203
+ // Inject session_id from environment variable
204
+ const sessionId = process.env.INTANGLE_SESSION_ID;
205
+ if (!sessionId) {
206
+ throw new Error("INTANGLE_SESSION_ID environment variable is required for the message tool");
207
+ }
208
+ return makeApiCall("message", {
209
+ ...args,
210
+ session_id: sessionId,
211
+ });
212
+ }
199
213
  server.setRequestHandler(CallToolRequestSchema, async (request) => {
200
214
  const { name, arguments: args } = request.params;
201
215
  try {
@@ -228,6 +242,9 @@ try {
228
242
  case "update_space":
229
243
  result = await handleUpdateSpace(args);
230
244
  break;
245
+ case "message":
246
+ result = await handleMessage(args);
247
+ break;
231
248
  default:
232
249
  throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
233
250
  }
@@ -164,7 +164,7 @@ export const TOOLS = [
164
164
  },
165
165
  add: {
166
166
  type: "object",
167
- description: "Add new items to context with automatic intelligent classification and topic suggestion",
167
+ description: "Add new items. ALWAYS pass 'type' field on each item to skip expensive auto-classification.",
168
168
  properties: {
169
169
  items: {
170
170
  type: "array",
@@ -174,7 +174,12 @@ export const TOOLS = [
174
174
  title: { type: "string", description: "Item title" },
175
175
  content: {
176
176
  type: "string",
177
- description: "Item content - system automatically classifies as task (actionable), context (knowledge), or skill (workflow/procedure) and suggests relevant topics. VALUABLE CONTENT INCLUDES: decisions and their reasoning, user preferences observed, lessons learned, process descriptions, meeting outcomes, project context, expertise areas, working patterns, and anything that would help future sessions understand this user/space better."
177
+ description: "Item content. VALUABLE CONTENT INCLUDES: decisions and their reasoning, user preferences observed, lessons learned, process descriptions, meeting outcomes, project context, expertise areas, working patterns, and anything that would help future sessions understand this user/space better."
178
+ },
179
+ type: {
180
+ type: "string",
181
+ enum: ["task", "context", "skill", "document"],
182
+ description: "REQUIRED: Item type. 'task' for actionable items, 'context' for knowledge/facts, 'skill' for workflows, 'document' for long-form reference material. Omitting this triggers expensive auto-classification."
178
183
  },
179
184
  subtasks: {
180
185
  type: "array",
@@ -212,7 +217,7 @@ export const TOOLS = [
212
217
  },
213
218
  required: ["title", "content"]
214
219
  },
215
- description: "Array of items to add. System intelligently: (1) classifies as task, context, or skill, (2) suggests 1-3 relevant topics based on content and existing topics. Examples: 'Need to fix auth bug' → task with topics like 'authentication', 'bug-fix'. 'Learned React batches updates' → context with topics like 'react', 'learning'. Tasks can include subtasks array for hierarchical task management."
220
+ description: "Array of items to add. ALWAYS pass 'type' field to skip auto-classification. System suggests 1-3 relevant topics based on content. Tasks can include subtasks array for hierarchical task management."
216
221
  }
217
222
  }
218
223
  },
@@ -297,6 +302,44 @@ export const TOOLS = [
297
302
  required: ["space_id"]
298
303
  }
299
304
  },
305
+ {
306
+ name: "message",
307
+ title: "Send Message",
308
+ description: "Send a message to the Intangle assistant for user interaction. Use type 'approval' to request approval (blocks until user responds), 'question' to ask the user a question (blocks until answered), 'notification' for informational updates (returns immediately), 'completion' to signal task completion (returns immediately), or 'error' to report errors (returns immediately).",
309
+ inputSchema: {
310
+ type: "object",
311
+ properties: {
312
+ type: {
313
+ type: "string",
314
+ enum: ["approval", "question", "notification", "completion", "error"],
315
+ description: "Message type. 'approval' and 'question' block until the user responds. 'notification', 'completion', and 'error' return immediately."
316
+ },
317
+ content: {
318
+ type: "string",
319
+ description: "The message content to display to the user"
320
+ },
321
+ metadata: {
322
+ type: "object",
323
+ description: "Optional context about the message",
324
+ properties: {
325
+ file: {
326
+ type: "string",
327
+ description: "Related file path"
328
+ },
329
+ action: {
330
+ type: "string",
331
+ description: "Action being performed"
332
+ },
333
+ details: {
334
+ type: "string",
335
+ description: "Additional details"
336
+ }
337
+ }
338
+ }
339
+ },
340
+ required: ["type", "content"]
341
+ }
342
+ },
300
343
  // DISABLED: memory_action tool is broken and causing errors.
301
344
  // Pending OHM protocol fix. Use update_space, search, or fetch_items instead.
302
345
  // {
package/index.ts CHANGED
@@ -270,6 +270,25 @@ try {
270
270
  })
271
271
  }
272
272
 
273
+ async function handleMessage(args: any) {
274
+ if (!args.type || !args.content) {
275
+ throw new Error("type and content are required")
276
+ }
277
+
278
+ // Inject session_id from environment variable
279
+ const sessionId = process.env.INTANGLE_SESSION_ID
280
+ if (!sessionId) {
281
+ throw new Error(
282
+ "INTANGLE_SESSION_ID environment variable is required for the message tool"
283
+ )
284
+ }
285
+
286
+ return makeApiCall("message", {
287
+ ...args,
288
+ session_id: sessionId,
289
+ })
290
+ }
291
+
273
292
  server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
274
293
  const { name, arguments: args } = request.params
275
294
 
@@ -304,6 +323,9 @@ try {
304
323
  case "update_space":
305
324
  result = await handleUpdateSpace(args)
306
325
  break
326
+ case "message":
327
+ result = await handleMessage(args)
328
+ break
307
329
  default:
308
330
  throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`)
309
331
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intangle/mcp-server",
3
- "version": "2.3.8",
3
+ "version": "2.4.0",
4
4
  "description": "Model Context Protocol server for Intangle - AI context that persists across conversations",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -187,7 +187,7 @@ export const TOOLS = [
187
187
  add: {
188
188
  type: "object",
189
189
  description:
190
- "Add new items to context with automatic intelligent classification and topic suggestion",
190
+ "Add new items. ALWAYS pass 'type' field on each item to skip expensive auto-classification.",
191
191
  properties: {
192
192
  items: {
193
193
  type: "array",
@@ -198,7 +198,13 @@ export const TOOLS = [
198
198
  content: {
199
199
  type: "string",
200
200
  description:
201
- "Item content - system automatically classifies as task (actionable), context (knowledge), or skill (workflow/procedure) and suggests relevant topics. VALUABLE CONTENT INCLUDES: decisions and their reasoning, user preferences observed, lessons learned, process descriptions, meeting outcomes, project context, expertise areas, working patterns, and anything that would help future sessions understand this user/space better."
201
+ "Item content. VALUABLE CONTENT INCLUDES: decisions and their reasoning, user preferences observed, lessons learned, process descriptions, meeting outcomes, project context, expertise areas, working patterns, and anything that would help future sessions understand this user/space better."
202
+ },
203
+ type: {
204
+ type: "string",
205
+ enum: ["task", "context", "skill", "document"],
206
+ description:
207
+ "REQUIRED: Item type. 'task' for actionable items, 'context' for knowledge/facts, 'skill' for workflows, 'document' for long-form reference material. Omitting this triggers expensive auto-classification."
202
208
  },
203
209
  subtasks: {
204
210
  type: "array",
@@ -242,7 +248,7 @@ export const TOOLS = [
242
248
  required: ["title", "content"]
243
249
  },
244
250
  description:
245
- "Array of items to add. System intelligently: (1) classifies as task, context, or skill, (2) suggests 1-3 relevant topics based on content and existing topics. Examples: 'Need to fix auth bug' → task with topics like 'authentication', 'bug-fix'. 'Learned React batches updates' → context with topics like 'react', 'learning'. Tasks can include subtasks array for hierarchical task management."
251
+ "Array of items to add. ALWAYS pass 'type' field to skip auto-classification. System suggests 1-3 relevant topics based on content. Tasks can include subtasks array for hierarchical task management."
246
252
  }
247
253
  }
248
254
  },
@@ -335,6 +341,46 @@ export const TOOLS = [
335
341
  required: ["space_id"]
336
342
  }
337
343
  },
344
+ {
345
+ name: "message",
346
+ title: "Send Message",
347
+ description:
348
+ "Send a message to the Intangle assistant for user interaction. Use type 'approval' to request approval (blocks until user responds), 'question' to ask the user a question (blocks until answered), 'notification' for informational updates (returns immediately), 'completion' to signal task completion (returns immediately), or 'error' to report errors (returns immediately).",
349
+ inputSchema: {
350
+ type: "object",
351
+ properties: {
352
+ type: {
353
+ type: "string",
354
+ enum: ["approval", "question", "notification", "completion", "error"],
355
+ description:
356
+ "Message type. 'approval' and 'question' block until the user responds. 'notification', 'completion', and 'error' return immediately."
357
+ },
358
+ content: {
359
+ type: "string",
360
+ description: "The message content to display to the user"
361
+ },
362
+ metadata: {
363
+ type: "object",
364
+ description: "Optional context about the message",
365
+ properties: {
366
+ file: {
367
+ type: "string",
368
+ description: "Related file path"
369
+ },
370
+ action: {
371
+ type: "string",
372
+ description: "Action being performed"
373
+ },
374
+ details: {
375
+ type: "string",
376
+ description: "Additional details"
377
+ }
378
+ }
379
+ }
380
+ },
381
+ required: ["type", "content"]
382
+ }
383
+ },
338
384
  // DISABLED: memory_action tool is broken and causing errors.
339
385
  // Pending OHM protocol fix. Use update_space, search, or fetch_items instead.
340
386
  // {