@intangle/mcp-server 2.1.4 → 2.1.6

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 +22 -0
  2. package/index.ts +28 -0
  3. package/package.json +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("view-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
  }
@@ -164,6 +180,12 @@ try {
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/index.ts CHANGED
@@ -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("view-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
  }
@@ -222,6 +244,12 @@ try {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intangle/mcp-server",
3
- "version": "2.1.4",
3
+ "version": "2.1.6",
4
4
  "description": "Model Context Protocol server for Intangle - AI memory that persists across conversations",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",