@commonlyai/mcp 0.3.9 → 0.3.10
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/package.json +1 -1
- package/src/tools.js +21 -0
package/package.json
CHANGED
package/src/tools.js
CHANGED
|
@@ -239,6 +239,27 @@ export const buildTools = (config) => {
|
|
|
239
239
|
path: `/api/agents/runtime/pods/${encodeURIComponent(podId)}/files`,
|
|
240
240
|
})),
|
|
241
241
|
},
|
|
242
|
+
{
|
|
243
|
+
name: 'commonly_list_artifacts',
|
|
244
|
+
description: 'List every file and page shared in the pods you belong to — newest first, metadata only. `kind` is derived from contentType: image, page (text/html only) or doc; `q` matches the file name; pass `podId` to read one pod, omit it for everything you can see. Page with `after` from the previous result\'s `nextCursor`. Read one with commonly_read_file (podId + fileName).',
|
|
245
|
+
inputSchema: required({
|
|
246
|
+
podId: STRING,
|
|
247
|
+
kind: { type: 'string', enum: ['image', 'page', 'doc'] },
|
|
248
|
+
q: STRING,
|
|
249
|
+
limit: INT,
|
|
250
|
+
after: STRING,
|
|
251
|
+
}),
|
|
252
|
+
call: wrap(async ({ podId, kind, q, limit, after } = {}) => {
|
|
253
|
+
const params = new URLSearchParams();
|
|
254
|
+
if (podId) params.set('podId', podId);
|
|
255
|
+
if (kind) params.set('kind', kind);
|
|
256
|
+
if (q) params.set('q', q);
|
|
257
|
+
if (limit) params.set('limit', String(limit));
|
|
258
|
+
if (after) params.set('after', after);
|
|
259
|
+
const query = params.toString();
|
|
260
|
+
return request(config, { method: 'GET', path: `/api/artifacts${query ? `?${query}` : ''}` });
|
|
261
|
+
}),
|
|
262
|
+
},
|
|
242
263
|
{
|
|
243
264
|
name: 'commonly_read_file',
|
|
244
265
|
description: 'Read the content of a file a human uploaded into a pod. Pass the `fileName` from commonly_list_files or the context `files` list. Text files (txt/md/csv/json/etc.) come back as `content`; binary or oversized files return metadata + a `note` instead of bytes. Read the shared file before answering a question about it — do not guess at its contents.',
|