Skip to main content
Glama

Remove a file from a document

remove_attachment
DestructiveIdempotent

Removes one attached file from a document. Downloads stop at once, even from a page a reader already has open; the file leaves the page's list the next time the page loads. Copies a reader already downloaded stay with them. It removes the file only: the page, its links and its reading history are untouched, and there is no tool that deletes a page or a link. The file cannot be recovered from HTMLRadar; attaching it again needs the original file. list_attachments returns the attachment id.

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": {
      "document_id": "<document_id>",
      "attachment_id": "<attachment_id>"
    },
    "name": "remove_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
document_idYesThe document the file is attached to: from list_documents or list_shares.
attachment_idYesThe attachment id from list_attachments.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare destructive=true and idempotent=true, and the description goes well beyond them: downloads halt immediately even on an already-open page, the file disappears from the page's list on next load, previously downloaded copies persist with the reader, and the file is unrecoverable from HTMLRadar. That is exactly the blast-radius and irreversibility context an agent needs before a destructive call.

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?

The core action and its immediate effect are front-loaded, and each subsequent sentence contributes a distinct fact (open-page behavior, retained copies, non-effects on page/links/history, irreversibility, id provenance). A few clauses could be tightened, but nothing is padding.

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?

Two required string parameters, rich annotations, and no output schema — the description supplies everything else an agent needs: the exact effect, timing of that effect, irreversibility, what survives, and where the id comes from. No behavioral gap is left for the caller to discover at runtime.

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 document_id and attachment_id are already documented in the schema with their source tools. The description's closing line ('list_attachments returns the attachment id') only restates that provenance, adding no new format, constraint, or edge-case meaning. 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?

Opens with a precise verb+resource+cardinality: "Removes one attached file from a document." It immediately bounds scope by stating what is NOT touched (page, links, reading history) and asserts no sibling deletes a page or link, so an agent can distinguish it from add_attachment or replace_document without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives the precondition for calling (attachment id comes from list_attachments) and a strong caution that the action is irreversible and requires the original file to undo. It does not name an explicit alternative tool for the 'I want to swap the file' case, but the sibling set contains no overlapping delete operation, so the implied routing is clear.

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.