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"]
      }
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It states the tool deletes a document, implying a destructive mutation, but doesn't cover critical aspects like permissions needed, whether deletion is permanent or reversible, error handling, or rate limits. This is a significant gap for a destructive operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's front-loaded with the core action and resource, making it easy to parse quickly without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (destructive mutation) and lack of annotations or output schema, the description is incomplete. It fails to address behavioral traits like safety, permissions, or response format, leaving the agent under-informed for a critical operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the 'id' parameter fully documented in the schema. The description adds no additional meaning beyond implying deletion targets a document by ID, which is already clear from the schema. Baseline 3 is appropriate as the schema handles parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Delete') and resource ('a JSON document by ID'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'load_json_doc' or 'save_json_doc' beyond the obvious verb difference, missing explicit sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description lacks context about prerequisites (e.g., needing an existing document), exclusions, or comparisons to siblings like 'query_json_docs', leaving the agent to infer usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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