download_attachment
Download an attachment from an email message by providing the message ID and attachment index. Returns base64-encoded content; decode it to access the raw file when the actual data is required.
Instructions
Download one attachment from a message. Returns base64-encoded content - decode it to get the raw file. Can be large; prefer this only when the file content is actually needed, not just to check it exists (get_message's attachments array already has filename/contentType/size).
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": "download_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Message id, from list_messages or get_thread | |
| index | Yes | Position in the attachments array from get_message |