Skip to main content
Glama

delete_json_doc

Remove a JSON document by its unique ID from the fireproof ledger database, ensuring secure deletion and multi-user synchronization on the MCP server.

Instructions

Delete a JSON document by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of document to delete

Implementation Reference

  • The handler logic for the delete_json_doc tool. It retrieves the document ID from the request arguments, validates it, deletes the document from the Fireproof database using db.del(id), and returns a confirmation message.
    case "delete_json_doc": {
      const id = String(request.params.arguments?.id);
      if (!id) {
        throw new Error("ID is required");
      }
    
      await db.del(id);
      return {
        content: [{
          type: "text",
          text: `Deleted document with ID: ${id}`
        }]
      };
    }
  • src/index.ts:67-80 (registration)
    Tool registration in the ListToolsRequestSchema handler, including the tool name, description, and input schema requiring a 'id' string.
    {
      name: "delete_json_doc",
      description: "Delete a JSON document by ID",
      inputSchema: {
        type: "object",
        properties: {
          id: {
            type: "string",
            description: "ID of document to delete"
          }
        },
        required: ["id"]
      }
    },
Install Server

Other Tools

Related Tools

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/fireproof-storage/mcp-database-server'

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