Email Get Attachment
email_get_attachmentRetrieve email attachments from iCloud Mail by message ID and attachment name or index. Save the file to a chosen directory or receive it inline.
Instructions
Download an email attachment.
With save_dir the file is written to disk and its path returned; otherwise the file is returned inline (images as image content, other types as an embedded resource).
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>",
"attachment": "<attachment>"
},
"name": "email_get_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | No | IMAP folder name. iCloud folders: INBOX, Drafts, 'Sent Messages', 'Deleted Messages', Junk, Archive (see email_list_folders). | INBOX |
| save_dir | No | Directory on the machine running this server to save the file into. Recommended when running locally (stdio). When omitted the file content is returned inline. | |
| attachment | Yes | Attachment index ('1') or (partial) file name as listed by email_get_message. | |
| message_id | Yes | Message ID (IMAP UID) from email_list_messages/email_search, valid within `folder` only. |