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.
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": {
"uid": "<uid>",
"partId": "<partId>"
},
"name": "get_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | Email UID | |
| length | No | Max bytes to return for paginated download (default 20 MB) | |
| offset | No | Byte offset for paginated download (returns raw encoded bytes, not decoded) | |
| partId | Yes | IMAP body part ID from list_attachments (e.g. "2", "1.2") | |
| mailbox | No | Mailbox name (default INBOX) |