Skip to main content
Glama

docs_delete

Destructive

Soft-delete a document. The row is marked deleted (deleted_at set) and removed from listings/search/embeddings, but stays in the database and can be restored by an admin via the workspace UI. The WHOLE SUBTREE goes with it — children (and their children) are soft-deleted as a unit. Works on UI folders too: pass the folder's UUID from docs_tree as docId (folders have no alias); deleting a folder soft-deletes everything inside it — to keep the children, first move them out via docs_update parentId/parentAlias. This is NOT a hard delete — for permanent removal, use the workspace admin tools. Requires delete permission (internal tokens only).

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": {
      "docId": "<docId>"
    },
    "name": "docs_delete"
  }
}

Input Schema

NameRequiredDescriptionDefault
docIdYesDocument UUID, short_id, or alias (folders: UUID only — they have no alias)
workspaceIdNoWorkspace UUID (optional, auto-selected if user has only one workspace)
workspaceAliasNoWorkspace alias (optional, auto-selected if user has only one workspace)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description goes further by disclosing that the delete is soft (deleted_at set), reversible by an admin, and cascades to the entire subtree. It omits how a repeat delete of an already-deleted document behaves, which matters given idempotentHint=false.

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-loaded with the core semantic (soft vs hard delete) and then the cascade rule, which is the right ordering. It is slightly redundant in restating the subtree cascade twice ('WHOLE SUBTREE' and 'deleting a folder soft-deletes everything inside it'), costing a bit of tightness.

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?

Covers the mutation's real semantics: reversibility, cascade behavior, permission requirement, and folder handling, which is substantial for a destructive tool with no output schema. The remaining gap is what happens on a repeat delete or on a missing/invalid docId, which is left unstated.

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 docId formats, the folder-UUID-only rule, and the optional workspace selectors are already documented. The description reinforces where the folder UUID comes from (docs_tree) but adds no new syntax or constraint beyond the schema, so the baseline 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 (soft-delete a document) and immediately qualifies the type of deletion, distinguishing it from a hard delete. It also extends the scope explicitly to folders, so an agent can tell exactly what object class it applies to.

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?

Names the alternatives and the conditions that select them: docs_update with parentId/parentAlias to preserve children before deleting a folder, and the workspace admin tools for permanent removal. It also states the prerequisite (delete permission, internal tokens only), leaving nothing to inference.

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.