get_mail_attachment
Retrieve a specific email attachment by mail message ID and attachment name. Returns the attachment as base64 or, for large files, writes directly to disk using an optional path.
Instructions
Fetch a single attachment of an indexed mail by name. Returns base64 by default; for large attachments pass save_to_path to write the file to disk instead of returning base64.
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_id": "<message_id>",
"name": "<name>"
},
"name": "get_mail_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Attachment file name as listed by list_mail_attachments. | |
| message_id | Yes | RFC message-id (external_id) of the mail. | |
| save_to_path | No | Optional absolute path to write the file to. Recommended for large attachments to avoid huge base64 payloads. |