download_attachment
Download a specific Gmail attachment to disk using the message ID and attachment part ID, and return the saved file path.
Instructions
Download a specific email attachment and save it to disk. Use list_attachments (or get_email) first to get the part ID. To save several (or all) attachments from an email in one call, use download_attachments instead. Returns the full path where the file was saved.
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>",
"partId": "<partId>"
},
"name": "download_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| partId | Yes | The attachment part ID (from list_attachments or get_email) | |
| saveTo | No | Directory path to save the file. Defaults to user Downloads folder (e.g. C:\Users\username\Downloads) | |
| messageId | Yes | The email message ID |