Skip to main content
Glama
Google Workspace MCP Server

Google Workspace MCP Server

by ChinmayNakwa

Get Gmail Message Content

get_gmail_message_content
Read-onlyIdempotent

Retrieve 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

NameRequiredDescriptionDefault
fullNoWhen 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).
formatNoMessage format. "full" (default) includes the body and attachments, "metadata" only headers.full
message_idYesThe unique ID of the Gmail message to retrieve.
body_formatNoBody 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_linksNoWhen 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_headersNoWhen 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_emailYesThe user's Google email address. Required.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.1

TDQS

A4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well past the readOnly/idempotent annotations: it discloses the 20,000-character truncation limit, that full=True exports to storage and returns a URL/path instead of streaming through context, and that stateless deployments without GCS staging fall back to inline untruncated bodies. These are exactly the non-obvious behaviors an agent needs to predict the response.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the core purpose, then truncation, then the full=True trade-off. The deployment-variant sentence is long but carries information not stated anywhere else; nothing is padding, though it could be tightened.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Return-value shape is explained even though an output schema exists, and the truncation/export edge cases are covered. Missing only authorization context (openWorldHint, which Google account scopes are required) and error behavior, which matter somewhat for a live Gmail read.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning by explaining the operational consequence of full=True (storage export, short-lived URL, transport-dependent shape) rather than restating the boolean. Other parameters such as format, body_format and include_links are left entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Retrieves the full content ... of a specific Gmail message') and enumerates the fields returned. It implicitly scopes out the thread and batch siblings by saying 'a specific Gmail message', but never names get_gmail_thread_content or get_gmail_messages_content_batch, so sibling differentiation is left to inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains the default behavior and when to reach for full=True ('large messages', 'byte-exact fidelity'), which is useful. It gives no guidance on when to use this single-message tool over the batch or thread siblings listed alongside it, so the routing decision between alternatives is unaddressed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools