@intangle/mcp-server 2.1.3 → 2.1.5
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 +23 -1
- package/dist/tool-definitions.js +1 -1
- package/index.ts +30 -2
- package/package.json +1 -1
- package/tool-definitions.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -124,6 +124,22 @@ try {
|
|
|
124
124
|
async function handleViewSpaces() {
|
|
125
125
|
return makeApiCall("list-spaces", {});
|
|
126
126
|
}
|
|
127
|
+
async function handleViewTopics(args) {
|
|
128
|
+
const { space_id } = args;
|
|
129
|
+
if (!space_id) {
|
|
130
|
+
throw new Error("space_id is required. Use view_spaces to see available options.");
|
|
131
|
+
}
|
|
132
|
+
return makeApiCall("list-topics", { space_id });
|
|
133
|
+
}
|
|
134
|
+
async function handleViewTopic(args) {
|
|
135
|
+
const { topic_id } = args;
|
|
136
|
+
if (!topic_id) {
|
|
137
|
+
throw new Error("topic_id is required. Use view_topics to get valid IDs.");
|
|
138
|
+
}
|
|
139
|
+
// Pass directly to API; ensure API expects 'topic_id' or adjust if it expects 'id'
|
|
140
|
+
// Usually view-topic endpoint takes 'topic_id' or 'id'
|
|
141
|
+
return makeApiCall("view-topic", { topic_id });
|
|
142
|
+
}
|
|
127
143
|
async function handleCreateSpace(args) {
|
|
128
144
|
return makeApiCall("create-space", args);
|
|
129
145
|
}
|
|
@@ -158,12 +174,18 @@ try {
|
|
|
158
174
|
case "search":
|
|
159
175
|
result = await handleSearchMemories(args);
|
|
160
176
|
break;
|
|
161
|
-
case "
|
|
177
|
+
case "fetch_items":
|
|
162
178
|
result = await handleFetch(args);
|
|
163
179
|
break;
|
|
164
180
|
case "view_spaces":
|
|
165
181
|
result = await handleViewSpaces();
|
|
166
182
|
break;
|
|
183
|
+
case "view_topics":
|
|
184
|
+
result = await handleViewTopics(args);
|
|
185
|
+
break;
|
|
186
|
+
case "view_topic":
|
|
187
|
+
result = await handleViewTopic(args);
|
|
188
|
+
break;
|
|
167
189
|
case "create_space":
|
|
168
190
|
result = await handleCreateSpace(args);
|
|
169
191
|
break;
|
package/dist/tool-definitions.js
CHANGED
package/index.ts
CHANGED
|
@@ -27,7 +27,7 @@ const DEBUG_LOG = "/tmp/intangle-mcp-debug.log";
|
|
|
27
27
|
function log(msg: string) {
|
|
28
28
|
try {
|
|
29
29
|
appendFileSync(DEBUG_LOG, `${new Date().toISOString()}: ${msg}\n`);
|
|
30
|
-
} catch (e) {}
|
|
30
|
+
} catch (e) { }
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
log("--- Server Starting ---");
|
|
@@ -170,6 +170,28 @@ try {
|
|
|
170
170
|
return makeApiCall("list-spaces", {});
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
+
async function handleViewTopics(args: any) {
|
|
174
|
+
const { space_id } = args as { space_id: string };
|
|
175
|
+
if (!space_id) {
|
|
176
|
+
throw new Error(
|
|
177
|
+
"space_id is required. Use view_spaces to see available options.",
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
return makeApiCall("list-topics", { space_id });
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
async function handleViewTopic(args: any) {
|
|
184
|
+
const { topic_id } = args as { topic_id: string };
|
|
185
|
+
if (!topic_id) {
|
|
186
|
+
throw new Error(
|
|
187
|
+
"topic_id is required. Use view_topics to get valid IDs.",
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
// Pass directly to API; ensure API expects 'topic_id' or adjust if it expects 'id'
|
|
191
|
+
// Usually view-topic endpoint takes 'topic_id' or 'id'
|
|
192
|
+
return makeApiCall("view-topic", { topic_id });
|
|
193
|
+
}
|
|
194
|
+
|
|
173
195
|
async function handleCreateSpace(args: any) {
|
|
174
196
|
return makeApiCall("create-space", args);
|
|
175
197
|
}
|
|
@@ -216,12 +238,18 @@ try {
|
|
|
216
238
|
case "search":
|
|
217
239
|
result = await handleSearchMemories(args);
|
|
218
240
|
break;
|
|
219
|
-
case "
|
|
241
|
+
case "fetch_items":
|
|
220
242
|
result = await handleFetch(args);
|
|
221
243
|
break;
|
|
222
244
|
case "view_spaces":
|
|
223
245
|
result = await handleViewSpaces();
|
|
224
246
|
break;
|
|
247
|
+
case "view_topics":
|
|
248
|
+
result = await handleViewTopics(args);
|
|
249
|
+
break;
|
|
250
|
+
case "view_topic":
|
|
251
|
+
result = await handleViewTopic(args);
|
|
252
|
+
break;
|
|
225
253
|
case "create_space":
|
|
226
254
|
result = await handleCreateSpace(args);
|
|
227
255
|
break;
|
package/package.json
CHANGED