Skip to main content
Glama
prismism-dev

Prismism MCP Server

by prismism-dev

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
NameRequiredDescriptionDefault
idYesArtifact ID to delete

Implementation Reference

  • 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.'],
            }),
          },
        ],
      };
    }
  • The input schema for the prismism_delete tool, validating the required artifact ID.
    inputSchema: {
      id: z.string().describe('Artifact ID to delete'),
    },
  • 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.'],
                }),
              },
            ],
          };
        }
      );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/prismism-dev/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server