Save Email Attachment
save_email_attachmentSaves a specified email attachment to disk by locating it in an Apple Mail account, mailbox, message ID, or subject keyword and writing it to a chosen path.
Instructions
Save a specific attachment from an email to disk.
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": {
"account": "<account>"
},
"name": "save_email_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | Account name (e.g., "Gmail", "Work", "Personal") | |
| mailbox | No | Mailbox to search in (default: "INBOX"). Use e.g. "Archive" for an already archived message; nested mailboxes use "/". | INBOX |
| save_path | No | Full path where to save the attachment. Protected locations (shell startup and dotfiles in ~, .git/hooks, LaunchAgents, ~/Library/Application Support, ...) are rejected; see "File Access" in the README for opt-in restriction to specific folders. | |
| message_id | No | Numeric internal Mail id returned by search_emails | |
| attachment_name | No | Name of the attachment to save | |
| subject_keyword | No | Keyword to search for in email subjects (ignored with message_id) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |