Skip to main content
Glama
jimpick

MCP JSON Document Collection Server

by jimpick

delete_json_doc_database

Remove a JSON document database from the MCP JSON Document Collection Server by specifying its name to manage storage and organization.

Instructions

Delete a JSON document database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseNameYes

Implementation Reference

  • Handler for delete_json_doc_database tool: parses input, queries metadata collection for the database entry, deletes the metadata entry if found, and returns confirmation message. Note: does not delete the actual database contents.
    case "delete_json_doc_database": {
      const parsed = DeleteDbArgsSchema.safeParse(args);
      if (!parsed.success) {
        throw new Error(`Invalid arguments for delete_json_doc_database: ${parsed.error}`);
      }
      const results = await localJsonDbCollection.query<string, JsonDocDb>(
        "name",
        {
          range: [
            parsed.data.databaseName,
            parsed.data.databaseName
          ]
        });
      if (results.rows.length != 1) {
        throw new Error(`Database not found: ${parsed.data.databaseName}`);
      }
      await localJsonDbCollection.del(results.rows[0].id);
    
      return {
        content: [
          {
            type: "text",
            text: `Deleted JSON document database: ${parsed.data.databaseName}`,
          }
        ]
      }
    }
  • Zod schema defining input for delete_json_doc_database: requires 'databaseName' string.
    const DeleteDbArgsSchema = z.object({
      databaseName: z.string(),
    });
  • src/index.ts:105-109 (registration)
    Registers the delete_json_doc_database tool in the ListTools response with name, description, inputSchema from DeleteDbArgsSchema, and required fields.
    {
      name: "delete_json_doc_database",
      description: "Delete a JSON document database",
      inputSchema: zodToJsonSchema(DeleteDbArgsSchema) as ToolInput,
      required: ["databaseName"],
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Delete') but lacks critical details: whether deletion is permanent or reversible, required permissions, side effects (e.g., all documents in the database are lost), error handling, or confirmation prompts. This is inadequate 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, direct sentence with zero wasted words. It front-loads the key action ('Delete') and resource, making it immediately understandable. Every word earns its place, achieving optimal conciseness.

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 destructive nature, no annotations, no output schema, and low schema coverage, the description is incomplete. It fails to address safety concerns, return values, or error conditions. For a deletion tool, this lack of context poses significant risks for an agent.

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

Parameters2/5

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

The input schema has 1 parameter with 0% description coverage, so the description must compensate. It mentions 'a JSON document database' but doesn't explain what 'databaseName' represents (e.g., identifier format, case sensitivity, or existence validation). This leaves the parameter's meaning ambiguous beyond the schema.

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 verb ('Delete') and resource ('a JSON document database'), making the purpose unambiguous. It distinguishes from siblings like 'delete_json_doc_from_db' (which deletes documents, not databases) and 'create_json_doc_database' (which creates databases). However, it doesn't specify the scope (e.g., permanent deletion vs. soft delete), which prevents a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., the database must exist), exclusions (e.g., cannot delete if in use), or sibling tools like 'list_json_doc_databases' for verification. Without such context, an agent might misuse it.

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

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/jimpick/mcp-json-db-collection-server'

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