Download invoice PDF
crunch_download_invoice_pdfDownloads 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
| Name | Required | Description | Default |
|---|---|---|---|
| save_to | No | Also 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_id | Yes | Invoice ID (see crunch_list_invoices) |