Skip to main content
Glama

delete_document

Destructive

Moves a single document to trash without purging content or versions. Requires write access and an explicit delete request; use permanently_delete_document for irreversible removal.

Instructions

Move one document to trash without purging content or versions. Use batch_documents(action=trash) for multiple explicit IDs. Requires write access and an explicit delete request; permanently_delete_document is a separate irreversible action.

Input Schema

NameRequiredDescriptionDefault
idYesUUID returned by the corresponding list or read operation.
workspaceIdNoWorkspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.

Output Schema

NameRequiredDescriptionDefault
idYes
deletedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.0.4
    • addedInput schema / properties / workspaceId
      Added value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
      +  "format": "uuid",
      +  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +  "type": "string"
      +}
  2. Changed2 schema fields changedv0.1.2
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / id / description
      Previous value: -"UUID of the document to move to trash; obtain it from search_documents, list_documents, or get_document."New value: +"UUID returned by the corresponding list or read operation."
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and non-idempotent, so the description earns credit for the extra context: content and versions are retained, write access and an explicit delete request are required, and permanent deletion lives elsewhere. Missing only detail on whether the document lands in list_trash or how long it is retained before purge.

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 short sentences, front-loaded with the effect and the reversibility guarantee, then alternatives, then prerequisites. No sentence is 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?

Output schema exists so return values need no explanation; the description covers the remaining agent-critical facts — recoverability, authorization requirement, and the sibling routing — for a two-parameter mutation tool.

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 id and workspaceId are already documented in the schema. The description adds no syntax, format, or ambiguity guidance beyond that, leaving this at the baseline.

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 ('Move one document to trash') and immediately bounds the effect ('without purging content or versions'). The singular scope plus the contrast with batch_documents makes it unmistakable among siblings.

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 routes multiple explicit IDs to batch_documents(action=trash) and names permanently_delete_document as the separate irreversible path. The agent has a clear decision rule for all three cases without opening a schema.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.