Skip to main content
Glama

Delete a knowledge document

delete_knowledge_document
DestructiveIdempotent

Permanently delete a knowledge document, its stored file and its pieces, after explicit user authorization. Agents stop using it at once. A mismatched confirm_name deletes nothing. Returns deleted, document_id and name, or an error.

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>",
      "confirm_name": "<confirm_name>"
    },
    "name": "delete_knowledge_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
llm_modelNoThe calling agent's provider model ID, as shown in the client's model configuration when available. Recorded for analytics.
document_idYesThe document's ``id``.
confirm_nameYesThe document's ``name``, as a safety check.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description adds real behavior: deletion is permanent, it cascades to the stored file and pieces, agents lose access immediately, and a mismatched confirm_name is a safe no-op. It also discloses the success payload and error case, so the agent knows exactly what effect and feedback to expect.

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

Conciseness4/5

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

Front-loaded with the destructive action and its blast radius, then the authorization precondition and the failure mode, which is the right order for a dangerous tool. Slightly marred by the trailing return-value sentence that largely duplicates the output schema, and by awkward line wrapping inside the text.

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

Completeness5/5

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

For a destructive, 3-parameter tool, the description covers blast radius, irreversibility, authorization requirement, guard-parameter failure behavior and error outcome. With annotations and an output schema already present, nothing an agent needs to invoke this safely is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description earns extra credit by explaining the runtime consequence of confirm_name ('a mismatched confirm_name deletes nothing') rather than just restating that it is a safety check. The analytics-only llm_model parameter is not mentioned, a minor omission.

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

Purpose5/5

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

States a specific verb and resource ('Permanently delete a knowledge document') plus the exact scope of what is removed ('its stored file and its pieces'), which is far more precise than the title alone. It is trivially distinguishable from siblings such as get_knowledge_document, add_knowledge_document and list_knowledge_documents.

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

Usage Guidelines4/5

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

Imposes a clear precondition ('after explicit user authorization') that tells the agent when deletion is permitted, which is exactly the guardrail needed for a destructive tool. It does not explicitly name an alternative path or spell out when not to use it (e.g. archive vs delete), so it stops short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.