Download an attachment
proton_get_attachmentReturns the base64-encoded bytes of a specific email attachment by its index. Supports truncation of large attachments with a maximum size limit.
Instructions
Returns the bytes of a specific attachment encoded as base64. Use the attachment index from proton_get_email. Large attachments are truncated to max_bytes (default 10 MB) with a truncated=true flag in the response.
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>",
"index": "<index>"
},
"name": "proton_get_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | ||
| index | Yes | Zero-based index in the attachments array | |
| mailbox | No | INBOX | |
| max_bytes | No | Maximum attachment size in bytes (default 10 MB, hard cap 50 MB) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base64 | Yes | ||
| filename | No | ||
| truncated | Yes | ||
| size_bytes | Yes | ||
| contentType | Yes | ||
| returned_bytes | Yes |