read_download
Loads a downloaded Lexware Office file into the conversation when the client cannot open its path or URI, returning XML as text and PDF pages or images for direct review.
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, 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. 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. | |
| max_pages | No | For a PDF, how many pages 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, or 'binary' for anything the client has to handle itself. |