Get Gmail Message Content
get_gmail_message_contentRetrieve a specific Gmail message’s subject, sender, recipients, and body, with options for full or truncated content, HTML, raw MIME, links, or metadata.
Instructions
Retrieves the full content (subject, sender, recipients, body) of a specific Gmail message.
Bodies are returned inline and truncated at 20,000 characters. Set full=True to get the complete, untruncated message instead: it is exported to storage and the response carries a short-lived download URL (HTTP transport) or file path (stdio transport) rather than the body, so large messages never stream through the model context. Stateless deployments without GCS staging have no storage, so there full=True returns the untruncated body inline; with GCS staging configured it returns a signed download URL like any other HTTP deployment.
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>",
"user_google_email": "<user_google_email>"
},
"name": "get_gmail_message_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| full | No | When True, return the COMPLETE untruncated message: saved to storage and referenced by download URL/file path instead of the body text. In stateless mode without GCS staging, the body is returned inline; with GCS staging, a signed download URL is returned. Use for messages large enough to hit the truncation limit, or when byte-exact fidelity is needed (pair with body_format='raw' for a .eml export). | |
| format | No | Message format. "full" (default) includes the body and attachments, "metadata" only headers. | full |
| message_id | Yes | The unique ID of the Gmail message to retrieve. | |
| body_format | No | Body output format (only applies when format='full'). 'text' (default) returns plaintext (HTML converted to text as fallback). 'html' returns the raw HTML body as-is without conversion. 'raw' fetches the full raw MIME message and returns the base64url-decoded content. | text |
| include_links | No | When True, append a LINKS section listing the http(s) URLs from the HTML body that the text output omits. Only applies to body_format='text'. | |
| include_headers | No | When False, omit the Subject/From/To/Date header summary (attached messages' too), and with full=True name the export after the message ID. Requires format='full'; body_format='raw' is only allowed when the raw message is exported to a file. | |
| user_google_email | Yes | The user's Google email address. Required. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |