Skip to main content
Glama

delete_document

Destructive

Deletes a document PERMANENTLY — and its file attachment where applicable. Irreversible: a plain removal from the view without loss is done with update_document({archived: true}). REFUSED (nothing deleted, the error lists the edges) while work-plan dependency edges name this document as a prerequisite: deleting it would silently unblock the dependent work. Remove those dependencies first. Also refused when the dependency graph cannot be read (retry).

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": {
      "documentId": "<documentId>"
    },
    "name": "delete_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
documentIdYesIdentifier of the document to delete PERMANENTLY (and its file attachment where applicable). A plain removal from the view is done with update_document({archived: true}).
expectedProjectIdNoUUID of the project THIS call targets (overrides the session project).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID of the project THIS call targets (overrides the session project). No access: refused, nothing changed."New value: +"UUID of the project THIS call targets (overrides the session project)."
  2. Changed1 schema field changed
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted."New value: +"UUID of the project THIS call targets (overrides the session project). No access: refused, nothing changed."
  3. Changed2 schema fields changed
    • changedInput schema / properties / documentId / description
      Previous value: -"Identifiant du document à supprimer DÉFINITIVEMENT (et sa pièce jointe le cas échéant). Un simple retrait de la vue se fait par update_document({archived: true})."New value: +"Identifier of the document to delete PERMANENTLY (and its file attachment where applicable). A plain removal from the view is done with update_document({archived: true})."
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID du projet visé par CET appel. Cible RÉELLEMENT ce projet au lieu du projet de session. Refusé sans rien modifier si l'accès n'est pas accordé."New value: +"UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted."
  4. Changed1 schema field changed
    • changedInput schema / properties / documentId / description
      Previous value: -"Identifiant du document à supprimer DÉFINITIVEMENT (et sa pièce jointe le cas échéant). Pour un simple retrait de la vue, préfère update_document({archived: true})."New value: +"Identifiant du document à supprimer DÉFINITIVEMENT (et sa pièce jointe le cas échéant). Un simple retrait de la vue se fait par update_document({archived: true})."
  5. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, but the description goes well beyond them: it names the side effect on file attachments, states irreversibility, explains exactly which condition causes a REFUSED result, discloses that the error lists the offending edges, and clarifies nothing is deleted on refusal. That is precisely the context annotations cannot convey.

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 critical fact (permanent, irreversible, attachment too) is front-loaded and every sentence carries information. It is dense with parentheticals and the refusal clause is a long compound sentence, which slightly hurts parseability but not substance.

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?

No output schema exists, and the description compensates by describing the refusal outcome and error content. For a two-parameter destructive tool it covers irreversibility, side effects, prerequisites, and failure handling — everything needed to call it safely.

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 100%, so both documentId and expectedProjectId are already documented in the schema. The description reinforces the permanence semantics of documentId but adds nothing about expectedProjectId's override behavior, so the baseline 3 is appropriate.

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 (delete_document), plus the crucial scope detail that deletion is PERMANENT and also removes the file attachment where applicable. It immediately distinguishes itself from the sibling update_document by naming that tool as the non-destructive alternative.

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?

Explicitly gives the when-not: use update_document({archived: true}) for a plain removal from the view. It also documents the prerequisite (remove work-plan dependency edges first) and the retry path when the dependency graph is unreadable, so an agent knows both the alternative and the blocking conditions.

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.