prismism_list
View and manage published artifacts with paginated results to organize and access your shared files efficiently.
Instructions
List your published artifacts with pagination.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (starts at 1) | |
| limit | No | Items per page (max 100) |
Implementation Reference
- src/tools/list.ts:16-45 (handler)The handler function for 'prismism_list' that processes the request, checks for the API key, and calls the API.
async ({ page, limit }) => { if (!hasApiKey()) { return { content: [ { type: 'text', text: JSON.stringify({ ok: false, error: { code: 'NO_API_KEY', message: 'API key required' }, _hints: ['Set PRISMISM_API_KEY in your MCP config.'], }), }, ], isError: true, }; } const result = await get(`/v1/artifacts?page=${page}&limit=${limit}`); if (!result.ok) { return { content: [{ type: 'text', text: JSON.stringify(result) }], isError: true, }; } return { content: [{ type: 'text', text: JSON.stringify({ ok: true, data: result.data }) }], }; } - src/tools/list.ts:11-14 (schema)The input schema definition for 'prismism_list' tool.
inputSchema: { page: z.number().int().min(1).default(1).describe('Page number (starts at 1)'), limit: z.number().int().min(1).max(100).default(20).describe('Items per page (max 100)'), }, - src/tools/list.ts:6-46 (registration)Registration of the 'prismism_list' tool with the MCP server.
server.registerTool( 'prismism_list', { title: 'List Prismism Artifacts', description: 'List your published artifacts with pagination.', inputSchema: { page: z.number().int().min(1).default(1).describe('Page number (starts at 1)'), limit: z.number().int().min(1).max(100).default(20).describe('Items per page (max 100)'), }, }, async ({ page, limit }) => { if (!hasApiKey()) { return { content: [ { type: 'text', text: JSON.stringify({ ok: false, error: { code: 'NO_API_KEY', message: 'API key required' }, _hints: ['Set PRISMISM_API_KEY in your MCP config.'], }), }, ], isError: true, }; } const result = await get(`/v1/artifacts?page=${page}&limit=${limit}`); if (!result.ok) { return { content: [{ type: 'text', text: JSON.stringify(result) }], isError: true, }; } return { content: [{ type: 'text', text: JSON.stringify({ ok: true, data: result.data }) }], }; } );