gmail_get_attachment
Download a Gmail attachment as base64 without saving it to disk, using message ID and filename to locate the part and enforcing size limits.
Instructions
Downloads a Gmail attachment as base64 without writing it to disk. Locates the part by filename within the message (Gmail attachment IDs are ephemeral and cannot be reused across calls). Refuses payloads over MAX_ATTACHMENT_BYTES. Attachment bytes are untrusted external content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | Exact attachment filename from gmail_get_thread_summary | |
| mime_type | No | Disambiguate when several parts share a filename | |
| message_id | Yes | Gmail message ID holding the attachment | |
| part_index | No | 0-based index among same-filename matches (e.g. repeated invite.ics) |