Skip to main content
Glama

Download expense attachment

crunch_download_expense_attachment
Read-only

Downloads a receipt or other file attached to an expense. Retrieves images for reading and returns PDFs as embedded resources, using expense and attachment IDs.

Instructions

Download a receipt or other file attached to an expense. Images are returned so you can read them; other files (PDFs) come back as an embedded resource. Attachment IDs and names come from crunch_get_expense.

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": {
      "expense_id": "<expense_id>",
      "attachment_id": "<attachment_id>"
    },
    "name": "crunch_download_expense_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)
expense_idYesExpense ID (see crunch_list_expenses)
attachment_idYesAttachment ID within the expense (0, 1, 2...; see crunch_get_expense)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, openWorldHint=false), but the description adds the return behavior that annotations cannot: images are returned readable and PDFs arrive as an embedded resource. That is meaningful disclosure for a tool with no output schema, though it says nothing about size limits or failure modes.

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?

Three short sentences, front-loaded with purpose and return format, then the prerequisite pointer. Nothing is padded or repeated.

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?

With no output schema, the description correctly compensates by describing the two return shapes (inline image vs embedded resource) and flags the save_to environment dependency. It is complete enough to call correctly, missing only edge-case behavior such as missing attachments or oversized files.

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%, so all four parameters are already documented in the schema, including save_to's no-overwrite and env-gating behavior. The description adds only the cross-reference to crunch_get_expense for ID/name sourcing, so baseline 3 is appropriate.

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 ("Download a receipt or other file attached to an expense") and scopes it to expenses, which separates it from the invoice-attachment siblings. It also names what comes back, so an agent knows what it is fetching without opening a 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?

Explicitly routes the agent to crunch_get_expense as the source of attachment IDs and names, and the save_to parameter carries the CRUNCH_FILES_DIR prerequisite. There is no explicit when-not guidance or naming of the invoice download alternatives, but the use context is unambiguous.

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