save_attachment
Downloads an email attachment from a specified message and writes it to a local path, enabling receipt and invoice files to be stored for spending reports.
Instructions
Download an email attachment and save it to disk.
Args: message_id: The message ID from search_emails results. filename: The attachment filename (from read_email's attachments list). save_path: Local file path to save the attachment to. folder: The folder the message is in.
Returns the path to the saved file, or an error message.
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>",
"filename": "<filename>",
"save_path": "<save_path>"
},
"name": "save_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | No | INBOX | |
| filename | Yes | ||
| save_path | Yes | ||
| message_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |