Skip to main content
Glama

Download invoice attachment

crunch_download_invoice_attachment
Read-only

Download a file attached to a sales invoice using invoice and attachment IDs retrieved from crunch_get_invoice.

Instructions

Download a file attached to a sales invoice. Attachment IDs and names come from crunch_get_invoice.

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": {
      "invoice_id": "<invoice_id>",
      "attachment_id": "<attachment_id>"
    },
    "name": "crunch_download_invoice_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
save_toNoAlso save the file in the server's CRUNCH_FILES_DIR: a directory (the file keeps its name) or a file path, absolute or relative to it. Existing files are never overwritten. Only works when the server sets CRUNCH_FILES_DIR
file_nameNoAttachment file name (looked up when omitted)
invoice_idYesInvoice ID (see crunch_list_invoices)
attachment_idYesAttachment ID within the invoice (see crunch_get_invoice)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=false and idempotentHint=false, so the safety profile is covered. The description adds the provenance of the identifiers but says nothing about how the file content is returned to the caller, which is the main behavioral unknown for a download tool.

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?

Two short sentences with zero filler, and the core action is stated first with the prerequisite second. Nothing is redundant or buried.

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?

For a four-parameter download tool with no output schema, the definition covers the identifiers and relies on the schema for save_to semantics. It omits how the downloaded content is delivered back to the agent, which is the one thing a caller most needs to know.

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 the schema already explains save_to, file_name, invoice_id and attachment_id in detail. The description only reinforces that attachment_id and file_name derive from crunch_get_invoice, which is a small addition over the structured fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Download a file attached to a sales invoice'), which is clearly distinct from fetching invoice data or the invoice PDF. It does not explicitly contrast itself with the near-sibling crunch_download_invoice_pdf, so an agent must infer the difference from the names.

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

Usage Guidelines3/5

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

It gives the prerequisite for the identifiers ('Attachment IDs and names come from crunch_get_invoice'), which is genuine when-to-use context. It offers no exclusions or comparison to alternatives such as crunch_download_invoice_pdf or crunch_download_expense_attachment.

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

Deploy Server

Other Tools