Get Gmail Attachment Content
get_gmail_attachment_contentDownload a Gmail attachment using its message ID and attachment ID. Receive a local file path, temporary URL, or base64 data for immediate use.
Instructions
Downloads an email attachment and saves it to local disk.
In stdio mode, returns the local file path for direct access. In HTTP mode, returns a temporary download URL (valid for 1 hour). May re-fetch message metadata to resolve filename and MIME type.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message_id | Yes | The ID of the Gmail message containing the attachment. | |
| attachment_id | Yes | The ID of the attachment to download. | |
| return_base64 | No | When True, includes the full attachment as a standard base64 string in the response (in addition to any file path or download URL). Useful for sandboxed clients that cannot reach localhost download URLs or the MCP server's local file paths (e.g. containerized agents with network allowlists). The returned base64 uses the standard alphabet, so it can be passed directly to tools like ``draft_gmail_message`` that expect standard (not URL-safe) base64. Default False preserves the existing behavior and response size. | |
| user_google_email | Yes | The user's Google email address. Required. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |