Skip to main content
Glama

Knowledge base: Delete doc

kb_delete_doc
Destructive

Delete one KB document by id and free the quota it held; its chunks leave search results immediately. Only the caller's own document is reachable. Destructive — runs only after you confirm via confirm_action. CONFIRMATION: this tool is PROPOSED, never performed directly. You get status='confirmation_required' with an action_id and a plan_token, and the write happens only after confirm_action.

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": {
      "doc_id": "<doc_id>"
    },
    "name": "kb_delete_doc"
  }
}

Input Schema

NameRequiredDescriptionDefault
doc_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior5/5

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

Beyond destructiveHint=true the description discloses effects annotations cannot: quota is freed, chunks vanish from search results immediately, and access is scoped to the caller's own document. It also spells out the two-phase proposal protocol including the returned status, action_id and plan_token, so the agent knows the first call performs no deletion.

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 action and its effect, then the scoping constraint, then the confirmation requirement. The confirmation point is stated twice ('runs only after you confirm via confirm_action' and the CONFIRMATION paragraph), which is mild redundancy but arguably warranted for a destructive tool.

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 single-parameter destructive tool with no output schema, the description covers what an agent needs: side effects, authorization scope, and the exact confirmation state it will receive back. Nothing required for correct invocation is missing apart from id formatting, which is a minor gap.

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?

Schema description coverage is 0% and the sole parameter doc_id accepts either an integer or a string, yet the description only says 'by id' — which merely restates the parameter name. It gives no hint about accepted id formats or how to obtain a valid id, so it fails to compensate for the coverage gap.

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 one KB document by id') plus a consequence ('free the quota it held'), which an agent can tell apart from kb_delete_collection by the 'one ... document' scope. It stops short of naming the sibling directly, so it is clear but not fully differentiated.

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?

Gives a real precondition ('Only the caller's own document is reachable') and routes the agent to the required follow-up tool by name ('confirm via confirm_action'). It never says when to prefer this over kb_delete_collection or what to do if the doc is not the caller's, so no explicit exclusion is stated.

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.

Resources