Skip to main content
Glama
mcp-knowledge-base

mcp-knowledge-base

by shelldon0x

delete_document

Deletes a document and all its chunks from the local knowledge base by document ID, removing outdated content from search results.

Instructions

Delete a document and its chunks from the knowledge base.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "document_id": "<document_id>"
    },
    "name": "delete_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
document_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden, and it does disclose one important trait beyond the schema: deletion cascades to the document's chunks. It omits irreversibility, required permissions, and behavior when the ID does not exist, which are significant gaps for a destructive tool.

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?

One short sentence with no filler, and the cascade detail is folded in rather than buried. Nothing is repeated from the name or schema.

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?

For a destructive, irreversible operation with no annotations and no output schema, the description should state whether deletion is permanent, whether the call errors on a missing ID, and what is returned. Only the cascade effect is covered, leaving the agent under-informed before committing an unrecoverable action.

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 0% for the single parameter document_id, so the description would need to compensate. Saying 'a document' implies the identifier refers to an existing document but adds no format, source, or acquisition guidance (e.g., from list_documents).

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?

States a specific verb and resource ('Delete a document') and adds scope by naming a second affected resource ('its chunks'). It does not explicitly contrast with siblings such as update_document or get_document, but the destructive verb makes the distinction obvious without opening another schema.

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?

There is no guidance on when to use this versus update_document or list_documents, and no condition for when-not to use it. For a destructive operation, the absence of any prerequisite or cautionary framing leaves selection entirely to the agent.

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