prismism_delete
Permanently delete artifacts from the Prismism MCP Server to manage storage and remove tracked files. This action cannot be undone.
Instructions
Permanently delete an artifact. This cannot be undone.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Artifact ID to delete |
Implementation Reference
- src/tools/delete.ts:15-53 (handler)The handler function that executes the deletion of a Prismism artifact using the 'del' client function.
async ({ id }) => { 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 del(`/v1/artifacts/${id}`); if (!result.ok) { return { content: [{ type: 'text', text: JSON.stringify(result) }], isError: true, }; } return { content: [ { type: 'text', text: JSON.stringify({ ok: true, data: { deleted: true, id }, _hints: ['Artifact permanently deleted.'], }), }, ], }; } - src/tools/delete.ts:11-13 (schema)The input schema for the prismism_delete tool, validating the required artifact ID.
inputSchema: { id: z.string().describe('Artifact ID to delete'), }, - src/tools/delete.ts:5-54 (registration)The function registering the 'prismism_delete' tool with the MCP server.
export function registerDeleteTool(server: McpServer) { server.registerTool( 'prismism_delete', { title: 'Delete Prismism Artifact', description: 'Permanently delete an artifact. This cannot be undone.', inputSchema: { id: z.string().describe('Artifact ID to delete'), }, }, async ({ id }) => { 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 del(`/v1/artifacts/${id}`); if (!result.ok) { return { content: [{ type: 'text', text: JSON.stringify(result) }], isError: true, }; } return { content: [ { type: 'text', text: JSON.stringify({ ok: true, data: { deleted: true, id }, _hints: ['Artifact permanently deleted.'], }), }, ], }; } );