download_attachment
Save an email attachment to the configured download directory by filename or index (or automatically if the message has one). Returns the saved file path.
Instructions
Save an attachment from a message to disk (into the configured download directory). Identify it by filename or 0-based index (from get_message); if the message has just one attachment, neither is needed. Returns the saved file 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": {
"uid": "<uid>"
},
"name": "download_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | The message uid. | |
| index | No | 0-based attachment index (alternative to filename). | |
| mailbox | No | The mailbox the uid belongs to (default "INBOX"). | |
| filename | No | The attachment filename to save. |