Skip to main content
Glama

Delete a document

delete_document
DestructiveIdempotent

Deletes data: permanently deletes one document from its shipment, as the person who connected this app, and records it in the organization's audit log. The file, what was read from it and the invoice lines imported from it are gone and cannot be recovered, and the shipment's checks run again. A packing list imported from it stays on the shipment, with any pre-allocations on it, until another packing list is read. Use it only when the user asks to delete the document, and confirm which one (file name, shipment) before calling. To keep a document but set it aside, use set_document_relevance; to put an older version back, restore_document. Get document ids from list_documents. Safe to repeat: a second call answers that the document does not exist. Answers with the document as it was, with deleted true.

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_idYesA document id such as "doc_45", as returned by list_documents.

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 flag destructive and idempotent, but the description goes further: it enumerates exactly what is destroyed (file, extracted data, imported invoice lines), what survives (an imported packing list and its pre-allocations), the side effect of re-running shipment checks, the audit-log record, and the response shape ("the document as it was, with deleted true"). This is detailed disclosure beyond the structured hints.

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?

The definition is front-loaded with the destructive outcome, then consequences, then usage rules and alternatives, then return behavior. Sentences are dense but purposeful; the packing-list pre-allocation sentence is detailed but genuinely load-bearing for a delete decision.

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?

There is no output schema, and the description compensates by stating what the tool returns (the document as it was, with deleted true). With one required parameter and destructive annotations, all information needed to call it safely and correctly is present.

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?

The single parameter is fully described in the schema (100% coverage, including the "doc_45" format), so the schema carries the load and the baseline applies. The description only adds that the agent should confirm file name and shipment with the user before choosing the id, which is useful but not a deeper specification of 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?

"Permanently deletes one document from its shipment" names a specific verb, resource, and scope, and is distinguishable from sibling operations like replace_document or set_document_relevance. It also names the actor context ("as the person who connected this app").

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

Usage Guidelines5/5

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

It states an explicit precondition ("Use it only when the user asks to delete the document, and confirm which one (file name, shipment) before calling") and routes to alternatives with their conditions: set_document_relevance for setting aside, restore_document for restoring. It also tells the agent where to get the id (list_documents).

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