get_attachment
Access email attachments using message and attachment IDs. This tool retrieves file content as plain text or provides base64 data for binary files, supporting downloads up to 8MB.
Instructions
Downloads one attachment of a message. Returns text for text-like files (txt, csv, html, json, ics) and base64 data (up to 8MB).
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>",
"attachmentId": "<attachmentId>"
},
"name": "get_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| messageId | Yes | ||
| attachmentId | Yes | attachmentId from get_message (zero-based index). |