@intangle/mcp-server 2.2.0 → 2.2.1

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.
Files changed (3) hide show
  1. package/dist/index.js +14 -13
  2. package/index.ts +21 -13
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -151,21 +151,22 @@ try {
151
151
  async function handleViewSpaces() {
152
152
  return makeApiCall("list-spaces", {});
153
153
  }
154
- async function handleViewTopics(args) {
154
+ async function handleViewProjects(args) {
155
155
  const { space_id } = args;
156
156
  if (!space_id) {
157
157
  throw new Error("space_id is required. Use view_spaces to see available options.");
158
158
  }
159
- return makeApiCall("view-topics", { space_id });
159
+ return makeApiCall("view-projects", { space_id });
160
160
  }
161
- async function handleViewTopic(args) {
162
- const { topic_id } = args;
163
- if (!topic_id) {
164
- throw new Error("topic_id is required. Use view_topics to get valid IDs.");
161
+ async function handleViewProject(args) {
162
+ const { project_id, space_id, slug } = args;
163
+ if (!project_id && !slug) {
164
+ throw new Error("Either project_id or slug (with space_id) is required. Use view_projects to get valid IDs.");
165
165
  }
166
- // Pass directly to API; ensure API expects 'topic_id' or adjust if it expects 'id'
167
- // Usually view-topic endpoint takes 'topic_id' or 'id'
168
- return makeApiCall("view-topic", { topic_id });
166
+ if (slug && !space_id) {
167
+ throw new Error("space_id is required when using slug. Use view_spaces to see available options.");
168
+ }
169
+ return makeApiCall("view-project", { project_id, space_id, slug });
169
170
  }
170
171
  async function handleCreateSpace(args) {
171
172
  return makeApiCall("create-space", args);
@@ -207,11 +208,11 @@ try {
207
208
  case "view_spaces":
208
209
  result = await handleViewSpaces();
209
210
  break;
210
- case "view_topics":
211
- result = await handleViewTopics(args);
211
+ case "view_projects":
212
+ result = await handleViewProjects(args);
212
213
  break;
213
- case "view_topic":
214
- result = await handleViewTopic(args);
214
+ case "view_project":
215
+ result = await handleViewProject(args);
215
216
  break;
216
217
  case "create_space":
217
218
  result = await handleCreateSpace(args);
package/index.ts CHANGED
@@ -204,24 +204,32 @@ try {
204
204
  return makeApiCall("list-spaces", {})
205
205
  }
206
206
 
207
- async function handleViewTopics(args: any) {
207
+ async function handleViewProjects(args: any) {
208
208
  const { space_id } = args as { space_id: string }
209
209
  if (!space_id) {
210
210
  throw new Error(
211
211
  "space_id is required. Use view_spaces to see available options."
212
212
  )
213
213
  }
214
- return makeApiCall("view-topics", { space_id })
214
+ return makeApiCall("view-projects", { space_id })
215
215
  }
216
216
 
217
- async function handleViewTopic(args: any) {
218
- const { topic_id } = args as { topic_id: string }
219
- if (!topic_id) {
220
- throw new Error("topic_id is required. Use view_topics to get valid IDs.")
217
+ async function handleViewProject(args: any) {
218
+ const { project_id, space_id, slug } = args as {
219
+ project_id?: string
220
+ space_id?: string
221
+ slug?: string
221
222
  }
222
- // Pass directly to API; ensure API expects 'topic_id' or adjust if it expects 'id'
223
- // Usually view-topic endpoint takes 'topic_id' or 'id'
224
- return makeApiCall("view-topic", { topic_id })
223
+
224
+ if (!project_id && !slug) {
225
+ throw new Error("Either project_id or slug (with space_id) is required. Use view_projects to get valid IDs.")
226
+ }
227
+
228
+ if (slug && !space_id) {
229
+ throw new Error("space_id is required when using slug. Use view_spaces to see available options.")
230
+ }
231
+
232
+ return makeApiCall("view-project", { project_id, space_id, slug })
225
233
  }
226
234
 
227
235
  async function handleCreateSpace(args: any) {
@@ -276,11 +284,11 @@ try {
276
284
  case "view_spaces":
277
285
  result = await handleViewSpaces()
278
286
  break
279
- case "view_topics":
280
- result = await handleViewTopics(args)
287
+ case "view_projects":
288
+ result = await handleViewProjects(args)
281
289
  break
282
- case "view_topic":
283
- result = await handleViewTopic(args)
290
+ case "view_project":
291
+ result = await handleViewProject(args)
284
292
  break
285
293
  case "create_space":
286
294
  result = await handleCreateSpace(args)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intangle/mcp-server",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
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",