Skip to main content
Glama

Download invoice PDF

crunch_download_invoice_pdf
Read-only

Downloads a sales invoice as a PDF as Crunch renders it for the customer; optionally saves it to disk when CRUNCH_FILES_DIR is configured.

Instructions

Download a sales invoice as a PDF, as Crunch renders it for the customer. Returned as an embedded resource; use save_to to also write it to disk (when the server sets CRUNCH_FILES_DIR).

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>"
    },
    "name": "crunch_download_invoice_pdf"
  }
}

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
invoice_idYesInvoice ID (see crunch_list_invoices)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description stays consistent with that read. It adds genuinely non-schema behavior: the output is server-rendered and delivered as an embedded resource, and persistent writes only happen under an environment-dependent condition. It does not mention whether repeated calls with save_to produce additional files or any size/rate limits.

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 tight sentences with the core return behavior front-loaded and the optional side effect second. No filler or redundant restatement of the name.

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 carries the burden of explaining the return value ('returned as an embedded resource') and the conditional persistence behavior. For a two-parameter read tool this is nearly complete; only edge cases around overwrite naming and error conditions are left implicit.

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 both parameters are already documented, including save_to's directory-vs-file-path semantics and the no-overwrite rule. The description only restates that save_to writes to disk under CRUNCH_FILES_DIR, adding no format or edge-case detail beyond the schema, so the baseline of 3 applies.

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?

States a specific verb (download) and resource (sales invoice as PDF) plus a qualifier — 'as Crunch renders it for the customer' — which separates it from data-returning siblings like crunch_get_invoice and from attachment downloads. It stops short of naming an alternative explicitly, so sibling differentiation is implied rather than stated.

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?

Gives clear operational context: the primary return is an embedded resource, and save_to is the optional pathway for writing to disk, gated on the server setting CRUNCH_FILES_DIR. It does not state when a caller should prefer the embedded resource over saving, or point to a sibling PDF/attachment tool, but the usage condition for the optional parameter 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