Read an attachment
get_attachmentRetrieve a specific attachment from a Proton Mail message using its index. Textual attachments are returned as text; binary attachments are refused with a reason.
Instructions
Reads one attachment of a message by index. The index comes from the attachment list in get_message. Textual attachments are returned as text, binary ones are refused with a reason rather than dumped into the context.
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": {
"messageId": "<messageId>",
"index": "<index>"
},
"name": "get_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | Index of the attachment, as shown by get_message. Starts at 0. | |
| offset | No | Where to continue reading a long attachment. The answer names the next offset. | |
| mailbox | No | Optional: the mailbox to look in first. | |
| messageId | Yes | The message id the attachment belongs to. |