Skip to main content
Glama

delete_document

Deletes a document by its full registry path, moving the file to the workspace trash so it can be restored from trash within 30 days.

Instructions

Delete a document. IMPORTANT: You must provide the full document path from the registry (e.g., "documents/my-document.md" or "documents/folder/my-document.md"). Recoverable: the file is moved to the workspace trash and the result reports trashPath (.hillnote/trash//…, kept 30 days) — restore_from_trash puts it back. NOTE: Do NOT use this for tasks in tasklists - use delete_task instead.

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

Input Schema

NameRequiredDescriptionDefault
workspaceYesWorkspace path/name
documentIdYesFull document path from registry (e.g., "documents/my-document.md"). MUST be the complete path including "documents/" prefix and file extension.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it discloses that the delete is a soft delete (moved to workspace trash), the trash path format, the 30-day retention window, and that the result reports trashPath. That is exactly the mutation/reversibility context an agent needs before calling a destructive operation.

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?

Front-loads the action, then the critical input constraint, then recovery semantics, then the sibling exclusion — a sensible priority order. Slight redundancy between the description's path example and the schema's identical example costs a point.

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 destructive tool with no annotations and no output schema, the description supplies everything essential: required input form, reversibility, retention, the returned trashPath, and the restore alternative. Nothing material is left to inference.

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 the schema already documents both workspace and documentId, including the requirement for the full path with prefix and extension. The description's path example largely restates the schema, only reinforcing rather than extending it, so 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 resource ("Delete a document") and immediately distinguishes it from siblings with the note to use delete_task for tasklist items. An agent can identify exactly what this tool removes without opening the 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 an explicit exclusion ("Do NOT use this for tasks in tasklists - use delete_task instead") and names restore_from_trash as the recovery path. Both the when-not and the corrective alternative are spelled out.

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