Get attachment
get_attachmentDownload an email attachment by its index. Provide a save path to write to disk, or receive the attachment as base64.
Instructions
Download one attachment from a message by index. Provide savePath to write it to disk (required for files >5MB); otherwise returns 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": {
"gmMsgId": "<gmMsgId>",
"index": "<index>"
},
"name": "get_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | Attachment index from get_message.attachments. | |
| account | No | Gmail address to act on. Omit to use the default account. | |
| gmMsgId | Yes | Gmail message id (X-GM-MSGID), as returned by search_messages or get_message. | |
| savePath | No | Absolute path to write the attachment to. |