save_attachment
Download an email attachment from a Gmail IMAP mailbox and save it to a local file path. Specify the email UID, exact filename, and destination directory to retrieve the attachment directly.
Instructions
Download an email attachment and save it to a specified 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>",
"filename": "<filename>",
"savePath": "<savePath>"
},
"name": "save_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | Email UID | |
| mailbox | No | IMAP mailbox the UID came from (the `mailbox` field in list results, e.g. "[Gmail]/Sent Mail"). Defaults to INBOX. Required for emails returned by get_emails_by_label, since UIDs are only unique within a mailbox. | |
| filename | Yes | Exact filename of the attachment to download | |
| savePath | Yes | Full file path where to save the attachment |