Skip to main content
Glama

Delete document

delete-document
DestructiveIdempotent

Delete a document by ID from the graph's document store.

WHEN TO USE:

  • To remove an outdated or incorrect policy/procedure document

  • To clean up a memory note that is no longer relevant

RETURNS: Confirmation of the deletion.

NOTES: Removes the document from PostgreSQL and its indexed sections from OpenSearch. Permanent — read it with get-document first.

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_idYesDocument ID to delete

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/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 goes well beyond them by disclosing the actual blast radius: the document is removed from PostgreSQL and its indexed sections are removed from OpenSearch. It also flags permanence ('Permanent') and recommends a read-before-delete verification step, which is exactly the context an agent needs before an irreversible cross-system write.

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 front-loaded with the one-line purpose, then organized under WHEN TO USE, RETURNS, and NOTES headers so an agent can scan the relevant block. Every sentence carries operational weight — no restatement of the title and no filler.

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 everything needed: what is deleted, from which systems, that it is permanent, what the return is ('Confirmation of the deletion'), and the recommended pre-check. Nothing material is left for the agent to infer before calling it.

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 description coverage is 100% and there is only one parameter, so the schema already documents document_id fully; the description's 'by ID' phrasing adds no format or syntax detail beyond it. With a single fully-documented required parameter, the description is adequate here, though it contributes nothing new on the parameter itself.

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?

The description opens with a specific verb and resource: 'Delete a document by ID from the graph's document store.' The verb, the keying strategy (by ID), and the storage location are all explicit, so an agent can distinguish this from the other delete-* siblings (delete-information-block, delete-report, delete-subgraph) without opening the schema.

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?

The WHEN TO USE block gives two concrete conditions (removing outdated/incorrect policy or procedure documents, cleaning up an irrelevant memory note), and the NOTES section adds a prerequisite step: 'read it with get-document first,' naming a specific sibling. What's missing is any explicit exclusion — nothing says which sibling to use instead when the target is an information block or journal entry rather than a document.

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.