@intangle/mcp-server 2.6.11 → 2.6.12

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
@@ -285,19 +285,7 @@ try {
285
285
  };
286
286
  });
287
287
  async function handleSearchContext(args) {
288
- const { space_id, query, topics, group_id, project_id, folder_id } = args;
289
- // Require space_id
290
- if (!space_id) {
291
- throw new Error("space_id is required. Use list_spaces to see available options.");
292
- }
293
- return makeApiCall("search", {
294
- space_id,
295
- query,
296
- group_id,
297
- project_id,
298
- folder_id,
299
- topics,
300
- });
288
+ return makeApiCall("search", args);
301
289
  }
302
290
  async function handleFetch(args) {
303
291
  const { id, ids, space_id } = args;
@@ -485,6 +473,22 @@ try {
485
473
  case "search":
486
474
  result = await handleSearchContext(args);
487
475
  break;
476
+ case "get_items":
477
+ case "update_items":
478
+ case "read_artifact": {
479
+ const remoteResult = await makeRemoteRpcCall("tools/call", {
480
+ name,
481
+ arguments: args
482
+ });
483
+ const textEntry = remoteResult?.content?.find((entry) => {
484
+ const content = entry;
485
+ return content?.type === "text" && typeof content.text === "string";
486
+ });
487
+ result = {
488
+ response: textEntry?.text || JSON.stringify(remoteResult)
489
+ };
490
+ break;
491
+ }
488
492
  case "fetch_items":
489
493
  result = await handleFetch(args);
490
494
  break;
@@ -1,40 +1,320 @@
1
1
  import { HIGHQ_DIRECT_TOOLS } from "./highq-tool-definitions.js";
2
+ const itemAttributesSchema = {
3
+ type: "object",
4
+ additionalProperties: false,
5
+ properties: {
6
+ status: {
7
+ type: "string",
8
+ enum: ["pending", "in_progress", "completed", "invalidated"]
9
+ },
10
+ priority: {
11
+ type: "string",
12
+ enum: ["urgent", "high", "medium", "low"]
13
+ },
14
+ assignee: {
15
+ type: ["object", "null"],
16
+ additionalProperties: false,
17
+ properties: {
18
+ id: { type: ["string", "null"] },
19
+ type: { type: ["string", "null"], enum: ["agent", "user", null] }
20
+ },
21
+ required: ["id", "type"]
22
+ },
23
+ pinned: { type: "boolean" },
24
+ presentation: {
25
+ type: "string",
26
+ enum: ["item", "group", "project", "folder"],
27
+ description: "Item presentation only; never a separate entity or hierarchy authority."
28
+ },
29
+ icon: { type: "string" },
30
+ color: { type: "string" },
31
+ topics: {
32
+ type: "array",
33
+ items: { type: "string" },
34
+ description: "Topic tags stored on the Item and its topic relationships."
35
+ },
36
+ importance: {
37
+ type: "number",
38
+ minimum: 0,
39
+ maximum: 1,
40
+ description: "Optional importance score for an insight Item."
41
+ },
42
+ confidence: {
43
+ type: "number",
44
+ minimum: 0,
45
+ maximum: 1,
46
+ description: "Optional confidence score for an insight Item."
47
+ },
48
+ category: {
49
+ type: "string",
50
+ description: "Optional category for an insight Item."
51
+ },
52
+ source_type: {
53
+ type: "string",
54
+ description: "Optional provenance category for an insight Item."
55
+ }
56
+ }
57
+ };
58
+ const itemIdsSchema = {
59
+ type: "array",
60
+ minItems: 1,
61
+ maxItems: 100,
62
+ items: { type: "string" }
63
+ };
64
+ const updateItemOperationSchema = {
65
+ oneOf: [
66
+ {
67
+ type: "object",
68
+ additionalProperties: false,
69
+ required: ["op", "title"],
70
+ properties: {
71
+ op: { type: "string", const: "create" },
72
+ title: { type: "string" },
73
+ content: { type: "string" },
74
+ type: {
75
+ type: "string",
76
+ enum: ["context", "task", "skill", "artifact", "insight"],
77
+ description: "Durable Item content kind. Skill and insight remain Items/Rooms, not separate product entities."
78
+ },
79
+ parent_id: { type: ["string", "null"] },
80
+ presentation: {
81
+ type: "string",
82
+ enum: ["item", "group", "project", "folder"],
83
+ description: "Optional Item presentation; this does not create a separate entity type."
84
+ },
85
+ attributes: itemAttributesSchema
86
+ }
87
+ },
88
+ {
89
+ type: "object",
90
+ additionalProperties: false,
91
+ required: ["op", "id"],
92
+ properties: {
93
+ op: { type: "string", const: "update" },
94
+ id: { type: "string" },
95
+ title: { type: "string" },
96
+ content: { type: "string" },
97
+ attributes: itemAttributesSchema
98
+ }
99
+ },
100
+ {
101
+ type: "object",
102
+ additionalProperties: false,
103
+ required: ["op", "new_parent_id"],
104
+ oneOf: [{ required: ["ids"] }, { required: ["criteria"] }],
105
+ properties: {
106
+ op: { type: "string", const: "move" },
107
+ ids: itemIdsSchema,
108
+ criteria: {
109
+ type: "object",
110
+ additionalProperties: false,
111
+ minProperties: 1,
112
+ properties: {
113
+ source_parent_id: {
114
+ type: ["string", "null"],
115
+ description: "Select Items whose authoritative parent_id is this Item. Null selects Space-root Items."
116
+ },
117
+ under: {
118
+ type: "string",
119
+ description: "Direct-parent alias for source_parent_id. The current Space ID selects Space-root Items."
120
+ },
121
+ ungrouped: { type: "boolean" },
122
+ type: { type: ["string", "null"] },
123
+ status: { type: ["string", "null"] }
124
+ }
125
+ },
126
+ new_parent_id: { type: ["string", "null"] },
127
+ relative_to_id: { type: ["string", "null"] },
128
+ position: {
129
+ type: ["string", "null"],
130
+ enum: ["before", "after", null]
131
+ },
132
+ dry_run: { type: "boolean" },
133
+ count_only: { type: "boolean" },
134
+ confirm_token: { type: ["string", "null"] },
135
+ limit: { type: "integer", minimum: 1, maximum: 500 },
136
+ operation_id: { type: ["string", "null"] }
137
+ }
138
+ },
139
+ {
140
+ type: "object",
141
+ additionalProperties: false,
142
+ required: ["op", "ids"],
143
+ properties: {
144
+ op: { type: "string", const: "delete" },
145
+ ids: itemIdsSchema
146
+ }
147
+ }
148
+ ]
149
+ };
2
150
  // Tools definition - matches the stdio server
3
151
  const TOOL_DEFINITIONS = [
4
152
  {
5
153
  name: "search",
6
154
  title: "Search Space",
7
- description: "Search for context, tasks, skills, and projects within a space. System automatically extracts quantity from natural language ('show 3 tasks' → 3 results, 'the last one' → 1 result) and intelligently formats results (1-3 items → summaries, 4+ items → IDs only). Default to one search per question, then use fetch_items for full details instead of repeating paraphrased searches.",
155
+ description: "Search Item and Room titles and content in the current Space. Defaults return useful snippets. Use include=full when search results must be self-sufficient, or use get_items for exact Item IDs.",
8
156
  inputSchema: {
9
157
  type: "object",
158
+ additionalProperties: false,
10
159
  properties: {
11
160
  query: {
161
+ oneOf: [
162
+ { type: "string" },
163
+ { type: "array", items: { type: "string" }, minItems: 1 }
164
+ ],
165
+ description: "One query or several queries merged into one ranked result set"
166
+ },
167
+ mode: {
12
168
  type: "string",
13
- description: "Search query with optional natural language hints for quantity ('show 5 tasks', 'the most recent', 'top 5'). Examples: 'show me 3 pending tasks', 'recent bugs', 'authentication issues'"
169
+ enum: ["auto", "semantic", "lexical", "recent"],
170
+ default: "auto"
14
171
  },
15
- space_id: {
172
+ under: {
16
173
  type: "string",
17
- description: "REQUIRED: Space to search in (use view_spaces to see available options)"
174
+ description: "Exact Item/Room subtree root"
18
175
  },
19
- group_id: {
176
+ depth: { type: "integer", minimum: 1, maximum: 512, default: 512 },
177
+ spaces: {
178
+ type: "array",
179
+ items: { type: "string" },
180
+ minItems: 1,
181
+ description: "Defaults to the current Space; cross-Space search fails closed"
182
+ },
183
+ filters: {
184
+ type: "object",
185
+ additionalProperties: false,
186
+ properties: {
187
+ status: { type: "string" },
188
+ priority: { type: "string" },
189
+ assignee: { type: "string" },
190
+ dates: {
191
+ type: "object",
192
+ additionalProperties: false,
193
+ properties: {
194
+ from: {
195
+ oneOf: [{ type: "string" }, { type: "number" }]
196
+ },
197
+ to: { oneOf: [{ type: "string" }, { type: "number" }] }
198
+ }
199
+ },
200
+ topics: { type: "array", items: { type: "string" } },
201
+ category: { type: "string" },
202
+ source: { type: "string" },
203
+ has_parent: { type: "boolean" },
204
+ legacy_label: {
205
+ type: "array",
206
+ minItems: 1,
207
+ uniqueItems: true,
208
+ items: {
209
+ type: "string",
210
+ enum: [
211
+ "Context",
212
+ "Task",
213
+ "Skill",
214
+ "Document",
215
+ "File",
216
+ "Artifact",
217
+ "ChatSummary",
218
+ "Group",
219
+ "Project",
220
+ "Folder"
221
+ ]
222
+ }
223
+ }
224
+ }
225
+ },
226
+ expand: { type: "integer", enum: [0, 1], default: 0 },
227
+ sort: {
20
228
  type: "string",
21
- description: "Optional: Restrict search to one group inside the chosen space."
229
+ enum: ["relevance", "recent", "oldest", "priority"]
22
230
  },
23
- project_id: {
231
+ include: {
232
+ type: "string",
233
+ enum: ["ids", "titles", "snippets", "full"],
234
+ default: "snippets"
235
+ },
236
+ limit: { type: "integer", minimum: 1, maximum: 100, default: 20 },
237
+ offset: { type: "integer", minimum: 0, maximum: 10000, default: 0 }
238
+ },
239
+ required: []
240
+ },
241
+ annotations: { readOnlyHint: true }
242
+ },
243
+ {
244
+ name: "get_items",
245
+ title: "Get Items",
246
+ description: "Read complete Items by exact IDs or browse below one Space/Item using authoritative parent_id hierarchy. Every Item is a Room; Spaces remain typed scopes. Legacy IDs are accepted with alias provenance preserved. Use include=assignees for typed User/Agent principals.",
247
+ inputSchema: {
248
+ type: "object",
249
+ additionalProperties: false,
250
+ properties: {
251
+ space_id: {
24
252
  type: "string",
25
- description: "Optional: Restrict search to one project inside the chosen space."
253
+ description: "REQUIRED: Exact Space containing the Items."
26
254
  },
27
- folder_id: {
255
+ organization_id: {
28
256
  type: "string",
29
- description: "Optional: Restrict search to one folder inside the chosen space/project."
257
+ description: "Optional Clerk organization ID for an organization Space."
30
258
  },
31
- topics: {
259
+ ids: {
32
260
  type: "array",
261
+ minItems: 1,
262
+ maxItems: 500,
33
263
  items: { type: "string" },
34
- description: "Optional: Filter by specific topics"
264
+ description: "Exact canonical or legacy Item IDs, returned in requested order."
265
+ },
266
+ under: {
267
+ type: "string",
268
+ description: "Exact Space ID or canonical/legacy Item ID to browse under."
269
+ },
270
+ depth: { type: "integer", minimum: 0, maximum: 20 },
271
+ limit: { type: "integer", minimum: 1, maximum: 200 },
272
+ offset: { type: "integer", minimum: 0, maximum: 5000 },
273
+ include: {
274
+ type: "array",
275
+ uniqueItems: true,
276
+ items: {
277
+ type: "string",
278
+ enum: [
279
+ "content",
280
+ "attributes",
281
+ "assignee",
282
+ "assignees",
283
+ "relations",
284
+ "artifact",
285
+ "metadata",
286
+ "all"
287
+ ]
288
+ }
289
+ }
290
+ },
291
+ required: ["space_id"]
292
+ }
293
+ },
294
+ {
295
+ name: "update_items",
296
+ title: "Update Items",
297
+ description: "Apply an ordered batch of create, update, move, or delete Item operations through Phoenix authority. Every Item is a Room. Results preserve operation order and report partial failures explicitly.",
298
+ inputSchema: {
299
+ type: "object",
300
+ additionalProperties: false,
301
+ properties: {
302
+ space_id: {
303
+ type: "string",
304
+ description: "REQUIRED: Exact Space containing the Items."
305
+ },
306
+ organization_id: {
307
+ type: "string",
308
+ description: "Optional Clerk organization ID for an organization Space."
309
+ },
310
+ operations: {
311
+ type: "array",
312
+ minItems: 1,
313
+ maxItems: 100,
314
+ items: updateItemOperationSchema
35
315
  }
36
316
  },
37
- required: ["query", "space_id"]
317
+ required: ["space_id", "operations"]
38
318
  }
39
319
  },
40
320
  {
@@ -846,10 +1126,28 @@ const TOOL_DEFINITIONS = [
846
1126
  // }
847
1127
  // }
848
1128
  ];
849
- const READ_ONLY_TOOLS = new Set([
850
- "search",
1129
+ // Retain implementation dispatch for stored calls and older clients while
1130
+ // removing the superseded names from model-facing MCP discovery.
1131
+ const PUBLIC_COMPATIBILITY_ALIASES = new Set([
1132
+ "assign_project_to_group",
1133
+ "create_group",
1134
+ "create_project",
1135
+ "delete_group",
1136
+ "delete_project",
851
1137
  "fetch_items",
852
1138
  "read_artifact",
1139
+ "rename_group",
1140
+ "rename_project",
1141
+ "update_folders",
1142
+ "update_memory",
1143
+ "view_groups",
1144
+ "view_project",
1145
+ "view_projects",
1146
+ "view_space"
1147
+ ]);
1148
+ const READ_ONLY_TOOLS = new Set([
1149
+ "search",
1150
+ "get_items",
853
1151
  "usage_status",
854
1152
  "fetch_conversation_messages",
855
1153
  "list_conversation_inbox",
@@ -860,15 +1158,10 @@ const READ_ONLY_TOOLS = new Set([
860
1158
  "HIGHQ_LIST_FOLDER_FILES",
861
1159
  "HIGHQ_GET_FILE_CONTENT"
862
1160
  ]);
863
- const DESTRUCTIVE_TOOLS = new Set([
864
- "update_memory",
865
- "update_folders",
866
- "HIGHQ_FILL_LEGAL_REPORT"
867
- ]);
1161
+ const DESTRUCTIVE_TOOLS = new Set(["update_items", "HIGHQ_FILL_LEGAL_REPORT"]);
868
1162
  const IDEMPOTENT_TOOLS = new Set([
869
1163
  "search",
870
- "fetch_items",
871
- "read_artifact",
1164
+ "get_items",
872
1165
  "usage_status",
873
1166
  "fetch_conversation_messages",
874
1167
  "list_conversation_inbox",
@@ -879,7 +1172,7 @@ const IDEMPOTENT_TOOLS = new Set([
879
1172
  "HIGHQ_LIST_FOLDER_FILES",
880
1173
  "HIGHQ_GET_FILE_CONTENT"
881
1174
  ]);
882
- export const TOOLS = TOOL_DEFINITIONS.map((tool) => ({
1175
+ export const TOOLS = TOOL_DEFINITIONS.filter((tool) => !PUBLIC_COMPATIBILITY_ALIASES.has(tool.name)).map((tool) => ({
883
1176
  ...tool,
884
1177
  annotations: {
885
1178
  ...(READ_ONLY_TOOLS.has(tool.name) ? { readOnlyHint: true } : {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intangle/mcp-server",
3
- "version": "2.6.11",
3
+ "version": "2.6.12",
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",
@@ -55,5 +55,5 @@
55
55
  "tsx": "^4.0.0",
56
56
  "typescript": "^5.0.0"
57
57
  },
58
- "intangleSourceHash": "820e9db48f528a0362f59fdb1639a5b0f64fe444c45353064e29ec54c797fd08"
58
+ "intangleSourceHash": "45767c8e5279c9b96a66e7aa48b59cc5f08a932a6810181e19b303697fafd85c"
59
59
  }