read_download
Reads a downloaded Lexware Office file into the conversation when the client cannot open its path or URI, including XML text, PDF pages, images, or embedded binary content.
Instructions
Put the contents of a downloaded file into this conversation.
No API call. Use it when the client cannot open the path or follow the uri, or when the content itself is the answer.
What arrives depends on the file: XML as text, so an XRechnung can be read. PDF as pictures of its pages, the first 10 unless max_pages says otherwise. Check pages against pagesShown and raise it, or pass null for up to 100, if the rest matters. For a long PDF or its exact wording, pass pdf_as "file" if you can open files: the PDF itself arrives as a file. Images as images. Anything else as an embedded binary.
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": {
"uri": "<uri>"
},
"name": "read_download"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | Yes | The `uri` a download reported, of the form lexware://download/... Only files this server downloaded can be read. | |
| pdf_as | No | A PDF as pictures of its pages, which every client can show, or as the file itself, for a model that can open files. | pages |
| max_pages | No | For a PDF as pages, how many to render from the front. Defaults to 10. Pass null for every page, up to 100, and expect roughly two thousand tokens per page. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | Yes | The download that was read. | |
| size | Yes | Size in bytes. | |
| pages | No | How many pages the document has, for a PDF. | |
| mimeType | Yes | The file's content type. | |
| pagesShown | No | How many of them were rendered into this answer. | |
| deliveredAs | Yes | How the content was put into the answer: 'text' for something readable such as an XRechnung, 'image' for a picture, 'pages' for a PDF rendered to images, 'file' for the PDF itself, or 'binary' for anything the client has to handle itself. |