download_attachment
Download one Gmail attachment's raw bytes as base64 (binary-safe — images, PDFs, etc.). Pass message_id and attachment_id from get_thread's messages[].attachments (each has attachment_id/filename/mime_type/size — check size there before downloading). Hard-capped at 5MB; larger attachments error rather than silently truncating. Needs only gmail.readonly (no reconnect). Pass account when more than one Gmail account is connected.
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>",
"attachment_id": "<attachment_id>"
},
"name": "download_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Account label the message belongs to. Required when several Gmail accounts are connected. | |
| message_id | Yes | Gmail message id (from get_thread's messages[].id). | |
| attachment_id | Yes | Attachment id (from get_thread's messages[].attachments[].attachment_id). |