Skip to main content
Glama

delete_doc

Destructive

Soft-delete documents or files by moving them to recoverable .trash/ in one attributed commit; remote mirrors are refused.

Instructions

Soft-delete a document or any file (a PDF, an image, an Office file): it moves to .trash/, recoverable, in one commit attributed to you. Refuses on remote mirrors (remotes/). To bring it back: undo_run with the run's id and paths (agent_runs gives the id), or the viewer's Trash; doc_revert cannot. To rename, use move_doc.

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": {
      "path": "<path>",
      "ai": "<ai>"
    },
    "name": "delete_doc"
  }
}

Input Schema

NameRequiredDescriptionDefault
aiYesYour AI family in lowercase (claude, chatgpt, gemini), not the model name. Attributes the change.
pathYesThe doc or file to delete, e.g. notes/old.md or files/scan.pdf.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.8.0
    • changedInput schema / properties / path / description
      Previous value: -"The doc or file to delete."New value: +"The doc or file to delete, e.g. notes/old.md or files/scan.pdf."
  2. First observedv2.7.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and openWorldHint=false, and the description goes well beyond them: the delete is soft and recoverable from .trash/, it lands in a single commit attributed to the calling agent, and it fails on remotes/. That tells an agent both the blast radius and the recovery route before it acts.

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?

Four short clauses, each doing distinct work: what it does, where the file goes, when it refuses, how to undo, and where to go for rename. The irreversible-sounding detail (recoverability) is front-loaded before the alternatives, with zero 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?

For a two-parameter mutation tool with no output schema, the description covers the effect, recoverability, failure condition, recovery workflow, and the sibling routing an agent needs. Nothing required to call it correctly is missing.

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 `path` and `ai` are already fully documented in the schema, including examples and the lowercase-family convention. The description only implies attribution via "attributed to you" and references `paths` in the context of undo_run rather than adding new meaning to this tool's own parameters, so the baseline 3 applies.

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 scope ("Soft-delete a document or any file") plus the concrete effect (moves to .trash/). It also names the operation it is not ("To rename, use move_doc") and explicitly disqualifies doc_revert as a restore path, so an agent can distinguish it from siblings without opening another schema.

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?

Gives when-to-use, an explicit when-not ("Refuses on remote mirrors (remotes/)"), and names alternatives with the condition that selects them: undo_run with the run id for recovery, the viewer's Trash, and move_doc for rename. The counter-guidance that doc_revert cannot restore is exactly the kind of exclusion that prevents misfires.

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