Skip to main content
Glama

Delete a document or tab

delete_document
Destructive

Delete a document by moving it to the Trash, where it can be restored for 30 days (with restore_document, or from Settings › Trash) before it is purged. With tabId, delete just one of its tabs, outright: tabs have no Trash. Confirm with the user first. A document must keep at least one tab.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabIdNoDelete 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.
documentIdYesThe document to delete (from find_documents / read_document).

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. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and readOnlyHint=false, so the safety profile is already known. The description adds substantial behavior beyond that: the 30-day Trash retention, restore options, that tabs bypass Trash entirely, and the 'must keep at least one tab' invariant.

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?

Three sentences, front-loaded with the default behavior, then the tabId special case, then the safeguard. No filler; every clause carries a distinct constraint.

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 destructive, two-parameter tool with an output schema and full annotation coverage, the description supplies the missing operational context: retention window, recovery path, irreversibility of tab deletion, and the invariant. Nothing needed to call it correctly is absent.

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 coverage is 100%, so both parameters are fully documented in the schema, which is the baseline for a 3. The description restates the tabId semantics (one tab, outright, no Trash) without adding syntax or format detail beyond what the schema already says.

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 (delete) and resource (document or one tab) and immediately distinguishes the two modes. Sibling tools like delete_diagram and restore_document are implicitly differentiated by the document-vs-diagram and delete-vs-restore split.

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 the when-to-use condition for tabId ('delete just one of its tabs') and names restore_document as the recovery path, plus instructs to confirm with the user first. It does not state when NOT to delete (e.g. preferring rename/update), but the routing guidance present is concrete.

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