Download expense attachment
crunch_download_expense_attachmentDownloads 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
| 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 | |
| file_name | No | Attachment file name (looked up when omitted) | |
| expense_id | Yes | Expense ID (see crunch_list_expenses) | |
| attachment_id | Yes | Attachment ID within the expense (0, 1, 2...; see crunch_get_expense) |