Skip to main content
Glama

Attach file

attach_file

Attach a file to an entity (invoice, expense, etc.).

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

A3.5/5.0
Behavior3/5

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

Annotations already cover readOnlyHint=false and destructiveHint=false. The description adds no behavioral details beyond the basic action, such as side effects, error conditions, or return values. It is consistent with the annotations but does not go beyond them.

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?

The description is a single, clear sentence that is concise and well-structured. It avoids unnecessary words and effectively communicates the tool's purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is relatively simple with three required parameters, all described. However, the description omits any mention of output or success/failure feedback, which could be important for an agent to confirm the attachment process. It is adequate but not fully comprehensive.

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?

The schema provides 100% coverage for all three parameters with clear descriptions. The tool description itself adds no additional parameter semantics, so the baseline score 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?

The description clearly states the action: attaching a file to an entity, with examples like invoice and expense. It is specific and distinguishes from file-related sibling tools such as list_files or remove_file.

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

Usage Guidelines2/5

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

The description provides no explicit guidance on when to use this tool versus alternatives. It lacks context about prerequisites (e.g., file must be uploaded first) and does not contrast with other file operations.

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