attachment_read
Download a stored shared file in base64-encoded chunks: read one byte window, continue with offset, and use total to know when the download is complete.
Instructions
Read one window of a stored file, base64-encoded. Clients use this to download a shared file in chunks; offset continues where the previous call stopped and total says when you are done. Not for the model to call on large files — use attachment_extract for text, and never for showing a picture (that is attachment_share; this returns bytes into YOUR context instead of a card). STORE ONLY: this never reads an arbitrary path.
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": {
"path": "<path>"
},
"name": "attachment_read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mime | No | ||
| name | No | ||
| path | Yes | Absolute path under the attachments directory (the value attachment_share returned). | |
| length | No | Bytes wanted; capped by the server. | |
| offset | No | Byte offset to start at (default 0). | |
| sha256 | No | Expected digest, echoed back when known. |