Skip to main content
Glama

Delete a document or tab (deprecated)

delete_diagram
Destructive

Deprecated: use delete_document instead; this name is removed on 2027-04-30. It takes the same input as delete_document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabIdNoThe deleted tab id (tab deletes).
deletedYesWhether the document or one of its tabs was deleted.
trashedNoTrue when the document went to the Trash.
documentIdYesThe document id.
restorableForDaysNoDays the document can be restored with restore_document before it is purged.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +{}
    • removedInput schema / properties / documentId
      Removed value: -{
      -  "description": "The document to delete (from find_documents / read_document).",
      -  "type": "string"
      -}
    • removedInput schema / properties / tabId
      Removed value: -{
      -  "description": "Delete only this ONE tab instead of the whole document. A document must keep at least one tab, so deleting the last remaining tab is refused. A tab is deleted outright; it does not go to the Trash.",
      -  "type": "string"
      -}
    • removedInput schema / required
      Removed value: -[
      -  "documentId"
      -]
  2. Changed11 schema fields changed
    • removedInput schema / properties / diagramId
      Removed value: -{
      -  "description": "The diagram to delete (from find_diagrams / read_diagram).",
      -  "type": "string"
      -}
    • addedInput schema / properties / documentId
      Added value: +{
      +  "description": "The document to delete (from find_documents / read_document).",
      +  "type": "string"
      +}
    • changedInput schema / properties / tabId / description
      Previous value: -"Delete only this ONE tab instead of the whole diagram. A diagram must keep at least one tab, so deleting the last remaining tab is refused. A tab is deleted outright; it does not go to the Trash."New value: +"Delete only this ONE tab instead of the whole document. A document must keep at least one tab, so deleting the last remaining tab is refused. A tab is deleted outright; it does not go to the Trash."
    • changedInput schema / required
      Previous value: -[
      -  "diagramId"
      -]New value: +[
      +  "documentId"
      +]
    • changedOutput schema / properties / deleted / description
      Previous value: -"Whether the diagram or one of its tabs was deleted."New value: +"Whether the document or one of its tabs was deleted."
    • changedOutput schema / properties / deleted / enum
      Previous value: -[
      -  "diagram",
      -  "tab"
      -]New value: +[
      +  "document",
      +  "tab"
      +]
    • removedOutput schema / properties / diagramId
      Removed value: -{
      -  "description": "The diagram id.",
      -  "type": "string"
      -}
    • addedOutput schema / properties / documentId
      Added value: +{
      +  "description": "The document id.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / restorableForDays / description
      Previous value: -"Days the diagram can be restored with restore_diagram before it is purged."New value: +"Days the document can be restored with restore_document before it is purged."
    • changedOutput schema / properties / trashed / description
      Previous value: -"True when the diagram went to the Trash."New value: +"True when the document went to the Trash."
    • changedOutput schema / required
      Previous value: -[
      -  "deleted",
      -  "diagramId"
      -]New value: +[
      +  "deleted",
      +  "documentId"
      +]
  3. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is covered structurally. The description adds the useful lifecycle fact (sunset date) and the input-equivalence note, but says nothing about what is destroyed, reversibility, or whether trashed diagrams can be restored via restore_diagram, which is available as a sibling.

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?

Two short clauses, front-loaded with the deprecation verdict and the replacement, then the date and input note. Nothing is wasted and the most decision-relevant fact comes first.

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

Completeness4/5

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

With an output schema present, return values need no explanation, and the redirect plus sunset date plus input-equivalence covers what an agent needs to act. The only gap is that the tool's actual effect (deleting a diagram/document) is left to the name and title.

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?

Zero declared parameters gives a baseline of 4. The description does add one piece of meaning the empty schema cannot convey: that the actual input contract is inherited from delete_document, which is important given the schema is just additionalProperties: {}.

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

Purpose3/5

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

The description never states the tool's own action; it only announces deprecation and points at delete_document. The verb+resource is inferable from the name 'delete_diagram' and the title, but the title ('Delete a document or tab') describes the replacement's scope rather than this tool, so the agent must infer that this is a destructive alias for diagram deletion.

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?

It explicitly names the alternative ('use delete_document instead') and gives a concrete cutoff date (2027-04-30), which is real routing guidance no sibling provides. It stops short of a full when/when-not rule set, e.g. whether this should be used at all before the sunset date.

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