get_attachment
Download email attachments from iCloud Mail by specifying the email UID and attachment part ID, returning base64-encoded file content for integration with other tools.
Instructions
Download a specific attachment from an email. Returns the file content as base64-encoded data. Use list_attachments first to get the partId. Maximum 20 MB per request; use offset+length for larger files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | Email UID | |
| partId | Yes | IMAP body part ID from list_attachments (e.g. "2", "1.2") | |
| mailbox | No | Mailbox name (default INBOX) | |
| offset | No | Byte offset for paginated download (returns raw encoded bytes, not decoded) | |
| length | No | Max bytes to return for paginated download (default 20 MB) |