Download an attachment of a message
get_attachmentDownload one attachment of a received message, by the index shown in read_message. Returns text files (txt, csv, md, json, ics, ...) as readable text and other files as an embedded base64 resource; with format "text" also PDFs and (if…
Instructions
Download one attachment of a received message, by the index shown in read_message. Returns text files (txt, csv, md, json, ics, ...) as readable text and other files as an embedded base64 resource; with format "text" also PDFs and (if enabled) images as their text, which is much cheaper to read. Blocked attachments (blocked in read_message) cannot be downloaded. To pass a file on, use forward_message or attach it with from_message in send_message instead of downloading it. Changes nothing.
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": {
"id": "<id>",
"index": "<index>"
},
"name": "get_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Message id from list_messages | |
| index | Yes | Attachment index from read_message.attachments | |
| format | No | auto: text files as text, others as file; text: the readable text of any file (PDF, image, text); file: always the file as base64 | auto |