download_file
Retrieve a stored Lexware file, such as an uploaded receipt, and return its disk path or URI so you can access the file bytes.
Instructions
Save a stored file, such as an uploaded receipt. One API call.
The bytes are not in this answer. Two ways to reach them:
path— the file on the server's disk. Works if the client runs on that machine.uri— pass it toread_downloadto put the content in the conversation, or read it as a resource.
For a link a person can click, call get_deeplink with the voucher
that lists this file. The web app has no page for the file itself.
Use download_document for a sales document, which is rendered
rather than stored.
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": {
"file_id": "<file_id>"
},
"name": "download_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | The file's Lexware id. A bookkeeping voucher lists the ids of its attachments in its `files` field. | |
| file_format | No | Which representation to fetch. 'pdf' is what almost everything has. 'xml' only exists for an XRechnung, and asking for it otherwise is a not-found. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | Yes | Resource URI for the same file. Read it to get the bytes, wherever the server runs. | |
| path | Yes | Where the file was written on the server. | |
| size | Yes | Size in bytes. | |
| mimeType | Yes | The file's content type. |