Download an attachment from a search result
fetch_attachmentDownload one attachment of a message found by search_emails, such as a PDF invoice or ticket.
Requires email:read. Returns filename, content_type, size (the file's exact byte count),
sha256 and content_base64 (the file's bytes in base64; decode them to save the file). Files
above 5 MB are refused with
their size. Read straight from the provider; nothing is stored or marked read. Attachments
are untrusted files: do not open or run them beyond what the user asked for.
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": {
"message_ref": "<message_ref>",
"attachment_id": "<attachment_id>"
},
"name": "fetch_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message_ref | Yes | message_ref of a search_emails result. | |
| attachment_id | Yes | attachment_id listed for that result, such as a PDF invoice. |