Gmail Download Attachment
gmail_download_attachmentDownloads a Gmail attachment and saves it to a specified path on the local server, creating parent folders and overwriting an existing file. Get the download_id from the email read first.
Instructions
Download one attachment of a Gmail message and save it to a file on the server's own filesystem. It works only when the server runs locally (stdio) and is refused over remote MCP; get the attachment's download_id from gmail_read_emails first. Returns status 'ok', saved_to (the path written) and bytes_written. Creates missing parent folders and overwrites an existing file at output_path.
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": {
"attachment_id": "<attachment_id>",
"message_id": "<message_id>",
"output_path": "<output_path>"
},
"name": "gmail_download_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message_id | Yes | Gmail message ID, from gmail_search_emails, gmail_get_mail_digest, gmail_check_mail_updates or gmail_get_thread results. | |
| output_path | Yes | File path on the server's machine to write, e.g. '/tmp/invoice.pdf'; missing folders are created and an existing file is overwritten. | |
| attachment_id | Yes | The attachment's download_id from gmail_read_emails for the same message_id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Machine-readable operation status. | |
| saved_to | No | ||
| bytes_written | No |