get_mail_attachment
Saves one email attachment to this Mac and returns its absolute path; supported images and documents also return preview content as image or text.
Instructions
Save one attachment of a message as a file on this Mac and return its absolute path. Images (JPEG, PNG, GIF, WebP, HEIC) are also returned as an image. PDF, text, RTF, DOC and DOCX files are also returned as text (cut at 100000 characters). Other types return the path only. Files above 25 MB are refused. Attachments of Mail that are not downloaded yet cannot be saved. The file is kept for 24 hours. Give the attachment by 'name' or 'index' from get_message. Needs 'confirm' true on every call. Ask the user first, because the file is copied to ~/Library/Caches/applesauce/attachments.
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": {
"id": "<id>"
},
"name": "get_mail_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Message id from search_mail. | |
| name | No | Attachment name from get_message. Give 'name' or 'index', not both. | |
| index | No | Attachment number from get_message. The first is 1. | |
| confirm | No | Must be true. Ask the user first: the call copies the attachment to this Mac. | |
| in_account | No | Account id of the message (the 'account_id' field of search_mail). Only needed with 'in_mailbox'. | |
| in_mailbox | No | Mailbox path of the message (the 'mailbox' field of search_mail). Only needed when Full Disk Access is missing. Give 'in_account' too. |