save_attachment
Save a single email attachment from Apple Mail to the restricted attachments folder, optionally choosing a subfolder or overwrite with confirmation; paths outside the folder are refused.
Instructions
Save one attachment to disk, inside the attachments folder.
Files can only be written inside the attachments folder
(APPLE_MAIL_MCP_ATTACHMENTS_DIR, default ~/Downloads/apple-mail-mcp).
Paths outside it are refused. The attachment's filename comes from the
sender and is cleaned (no path separators, no leading dots); the result
reports both name (as saved) and original_name.
Args: account, mailbox, id: As returned by search_messages. index: 1-based index from list_attachments. target_dir: Optional subfolder. Relative paths are taken relative to the attachments folder; absolute paths must be inside it. Default: the folder itself. Created if missing. overwrite: If false (default), append " (2)", " (3)" etc. when the name is taken. True replaces existing files and requires confirm=true. confirm: Required with overwrite=true. Get the user's approval first.
Returns {saved_path, name, original_name, size, downloaded}.
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>",
"mailbox": "<mailbox>",
"id": "<id>",
"index": "<index>"
},
"name": "save_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| index | Yes | ||
| account | Yes | ||
| confirm | No | ||
| mailbox | Yes | ||
| overwrite | No | ||
| target_dir | No |