@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.
- package/dist/index.js +14 -13
- package/index.ts +21 -13
- 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
|
|
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-
|
|
159
|
+
return makeApiCall("view-projects", { space_id });
|
|
160
160
|
}
|
|
161
|
-
async function
|
|
162
|
-
const {
|
|
163
|
-
if (!
|
|
164
|
-
throw new Error("
|
|
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
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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 "
|
|
211
|
-
result = await
|
|
211
|
+
case "view_projects":
|
|
212
|
+
result = await handleViewProjects(args);
|
|
212
213
|
break;
|
|
213
|
-
case "
|
|
214
|
-
result = await
|
|
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
|
|
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-
|
|
214
|
+
return makeApiCall("view-projects", { space_id })
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
async function
|
|
218
|
-
const {
|
|
219
|
-
|
|
220
|
-
|
|
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
|
-
|
|
223
|
-
|
|
224
|
-
|
|
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 "
|
|
280
|
-
result = await
|
|
287
|
+
case "view_projects":
|
|
288
|
+
result = await handleViewProjects(args)
|
|
281
289
|
break
|
|
282
|
-
case "
|
|
283
|
-
result = await
|
|
290
|
+
case "view_project":
|
|
291
|
+
result = await handleViewProject(args)
|
|
284
292
|
break
|
|
285
293
|
case "create_space":
|
|
286
294
|
result = await handleCreateSpace(args)
|