Skip to main content
Glama

Get an expense's invoice file

get_expense_file
Read-only

Get the invoice attached to an expense: a download link valid for 15 minutes and, with includeContent, the file itself (PDF or image) so you can read it. When the invoice was cut out of a PDF that held several (the expense has sourceFile), source: true gets that whole PDF, kept intact, instead. Requires the expenses feature.

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": {
      "id": "<id>"
    },
    "name": "get_expense_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe expense ID
sourceNoGet the whole PDF the invoice was cut out of, not the invoice itself
includeContentNoAlso return the file (up to 5 MB) to read it

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?

Beyond the readOnly and openWorld annotations, it discloses key behavior: the download link expires after 15 minutes, includeContent returns the PDF or image itself, source returns the intact original PDF, and the expenses feature is required. This gives an agent the operational context needed to invoke it correctly.

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 compact and front-loaded: it first states what is returned, then explains includeContent and source, then notes the feature requirement. Every sentence contributes useful information without redundancy.

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?

Given the moderate complexity, full schema coverage, and absence of an output schema, the description is complete enough. It explains return values, link expiry, the optional file content, source-PDF behavior, and the feature prerequisite.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds meaningful context for source: it explains when the invoice was cut from a larger PDF and that the expense has sourceFile. It also clarifies includeContent as the way to read the file, though id requires no further explanation.

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: 'Get the invoice attached to an expense.' It also explains the includeContent and source variants, making the tool's scope clear. It does not explicitly differentiate from sibling tools such as get_invoice or get_invoice_pdf, so it falls short of a 5.

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?

It gives conditional usage guidance: use includeContent to read the file, and use source: true when the invoice was cut from a multi-invoice PDF. It does not name alternative tools or state when not to use this one, leaving some routing to inference.

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.