Read an email attachment
get_attachmentReads one attachment of an email, by its position in the attachments list returned by get_message (index 0 = first). Documents (PDF, Word .docx, text, HTML, CSV, JSON, calendar files) are returned as text, truncated beyond 50,000 characters (truncated: true); images (PNG, JPEG, GIF, WebP) are returned as the image itself. Other formats (spreadsheets, archives, scanned PDFs without text) are reported as unsupported. Attachments over 10 MB are not read. Does not mark the message as read.
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": {
"accountId": "<accountId>",
"uid": "<uid>"
},
"name": "get_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | IMAP UID of the message, as returned by search and listing tools. | |
| index | No | Position in get_message's attachments list, starting at 0. | |
| folder | No | IMAP folder containing the message. Defaults to INBOX. | INBOX |
| accountId | Yes | Account id, as returned by list_accounts. |