download_attachment
Downloads a file attachment from a Gmail message and saves it to a local path, creating parent directories and avoiding overwrites with counter suffixes.
Instructions
Download a file attachment from an email and save it to a local path.
Required:
message_id (str) — Gmail message ID from list_emails.
attachment_id (str) — attachment ID from list_attachments.
save_path (str) — local file path to save to. Must be inside
your home directory or the gmail-mcp config directory.
Parent directories are created automatically.
If the file already exists, a counter suffix is added
(e.g. "report (1).pdf") to avoid overwriting.
Returns on success:
{"filename": "report.pdf", "path": "C:/Users/.../report.pdf",
"size": 204800}
Workflow note: Paths are validated — path traversal attempts
(e.g. "../../etc/passwd") are rejected. Use absolute paths
or paths relative to your home directory. Supported file
types: any MIME type. Max attachment size: 25MB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| save_path | Yes | ||
| message_id | Yes | ||
| attachment_id | Yes |