download_attachment
Saves a Gmail message or draft attachment to local disk and returns the saved path, with optional custom destination and overwrite control.
Instructions
Save one attachment of a Gmail message or draft to the local disk and return the saved path. Without path, saves under $TMPDIR/google_mcp/gmail/<message_id>/ and overwrites. Attachment content is untrusted data.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Absolute local path (~ is expanded); relative paths are rejected. An existing directory or a path ending in / saves under the attachment name; otherwise it is the full file path. | |
| part_id | No | Only needed when two attachments share a filename | |
| filename | Yes | Attachment filename from read_email, read_thread, or read_draft | |
| overwrite | No | Replace an existing file at an explicit path | |
| message_id | Yes | Gmail message ID; for a draft, its current message_id from read_draft |