download_attachment
Download email attachments by providing message and attachment IDs. Optionally save to a directory for direct file access or receive base64-encoded bytes.
Instructions
Download an attachment. If save_to (directory) is provided, writes the
file there and returns its path. Otherwise returns base64-encoded bytes.
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": {
"message_id": "<message_id>",
"attachment_id": "<attachment_id>"
},
"name": "download_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message_id | Yes | ||
| attachment_id | Yes | ||
| save_to | No | ||
| account | No | ||
| folder | No | INBOX |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||