Skip to main content
Glama

remove_document

Permanently delete named documents and all associated data only after explicit user confirmation. Use it to remove documents irreversibly, then inspect per-document results for failures.

Instructions

Permanently delete documents and all associated data. Only invoke when the user explicitly names the documents AND confirms deletion. Returns results — one entry per requested document: { doc_name, status: "deleted" | "not_found" | "failed", error? }. Inspect each entry for per-document failures. This action is irreversible.

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": {
      "doc_names": "<doc_names>"
    },
    "name": "remove_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
doc_namesYesArray of document names to delete. Each name must be copied verbatim from the `name` field of a browse_documents() or search_documents() response (case-sensitive, include extension). Example: ["Q3 Report.pdf", "draft.pdf"]. Max 10 per call.
folder_idNoDisambiguator for same-name documents. Copy the `folder_id` from the intended browse/search result; use "root" for root-level documents, or "shared-with-me"/"following" for the read-only folders at the library root; omit if `doc_name` is unique. Copy any folder_id verbatim from a browse_documents()/get_folder_structure() response, never construct one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.9.0
    • addedInput schema / properties / folder_id / description
      Added value: +"Disambiguator for same-name documents. Copy the `folder_id` from the intended browse/search result; use \"root\" for root-level documents, or \"shared-with-me\"/\"following\" for the read-only folders at the library root; omit if `doc_name` is unique. Copy any folder_id verbatim from a browse_documents()/get_folder_structure() response, never construct one."
    • addedInput schema / properties / folder_id / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. First observedv1.8.2

TDQS

A4.4/5.0
Behavior4/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 well: it declares irreversibility, warns that all associated data is removed, and documents the per-document result contract including partial-failure statuses. It stops short of stating permission requirements or whether failures leave earlier documents already deleted.

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 sentences, front-loaded with the destructive verb and the invocation gate, then the return shape. Nothing is redundant and no sentence could be dropped without losing signal.

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?

There is no output schema, so documenting the `results` entry shape (doc_name, status, error) is genuinely necessary and present. What remains unstated is authorization requirements and whether a partial batch failure is retryable — minor gaps for an otherwise complete destructive-tool definition.

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%, and the schema itself already explains verbatim copying, case sensitivity, folder_id disambiguation, and the 10-per-call cap. The description adds no parameter-level meaning beyond that, 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 resource — "Permanently delete documents and all associated data" — which no sibling tool (browse, search, get, process) covers. The destructive scope is unambiguous from the first clause.

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 gating condition: only invoke when the user explicitly names the documents AND confirms deletion. This is a clear when-to-use rule with a built-in exclusion, which is exactly what a destructive tool needs.

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