Skip to main content
Glama

Remove file

remove_file
Destructive

Remove (detach) a file from an entity by id. This only retracts the link between the file and the record — the underlying file is not deleted from storage and the entity itself is unchanged. Unlike the delete_* tools (delete_document, delete_folder, delete_expense, …) which remove whole records or folders, this leaves both the file and the entity intact.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entityYesEntity kind to attach the file to, e.g. "expense", "income", "asset", "transaction", "entry", "client", "supplier", "product". For any document — invoice, quote, credit/debit note, purchase order, bill or goods-received note — use "contract" (its id may start with cont-, inv- or order-); the correct storage attribute is resolved from the id, so a bill (cont-… id) also resolves whether you pass "contract", "bill" or "invoice".
fileidYesId of the uploaded file to attach (see /file/upload).
entityidYesId of the entity to attach the file to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / entity / description
      Added value: +"Entity kind to attach the file to, e.g. \"expense\", \"income\", \"asset\", \"transaction\", \"entry\", \"client\", \"supplier\", \"product\". For any document — invoice, quote, credit/debit note, purchase order, bill or goods-received note — use \"contract\" (its id may start with cont-, inv- or order-); the correct storage attribute is resolved from the id, so a bill (cont-… id) also resolves whether you pass \"contract\", \"bill\" or \"invoice\"."
    • addedInput schema / properties / entityid / description
      Added value: +"Id of the entity to attach the file to."
    • addedInput schema / properties / fileid / description
      Added value: +"Id of the uploaded file to attach (see /file/upload)."
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Despite destructiveHint true, description clarifies that only the link is removed, not the file or entity. This accurately discloses side effects and allays concerns about data loss.

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 main description is concise and well-structured, but the entity parameter description is excessively long and includes tangential resolution behavior, adding noise.

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?

The description covers the essential semantics and distinguishes from delete_* siblings. It could explicitly reference attach_file as the inverse operation, but overall adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All three parameters are documented, but descriptions use 'attach' rather than 'remove/detach' (e.g., 'Id of the uploaded file to attach', 'Id of the entity to attach the file to'), which is inconsistent with the tool's purpose and could mislead an agent. Entity description is also overloaded with attach-specific resolution detail.

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?

Clearly states it removes/detaches a file from an entity by id, and distinguishes from delete_* tools, making purpose unambiguous.

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?

Explicitly contrasts with delete_* tools to prevent misuse, explaining that the underlying file and entity remain intact. This gives clear guidance on when to choose this tool over destructive alternatives.

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.

Resources