get_gmail_attachment_content
Download a Gmail attachment to disk or get a temporary download URL. Requires the parent message ID and attachment ID from the message payload.
Instructions
Download a Gmail attachment to disk (or expose via download URL).
Side effects: writes a file to the configured attachment storage (stdio mode) or publishes a temporary download URL valid for 1 hour (HTTP mode). In stateless mode, no file is written and a base64 preview is returned instead. Attachment IDs are ephemeral — always re-fetch the parent message (get_gmail_message_content) just before calling this. Requires the gmail.readonly OAuth scope.
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": {
"message_id": "<message_id>",
"attachment_id": "<attachment_id>",
"user_google_email": "<user_google_email>"
},
"name": "get_gmail_attachment_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message_id | Yes | Gmail message ID that owns the attachment. | |
| attachment_id | Yes | Attachment ID from the parent message's payload parts — get this by calling get_gmail_message_content and reading the attachment metadata section. | |
| user_google_email | Yes | The user's Google email address (authenticated account). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |