Skip to main content
Glama
flt-sudo

gmail-mcp-server

by flt-sudo

Get Gmail message

gmail_get_message
Read-onlyIdempotent

Retrieve a single Gmail message by ID with full body text and attachment metadata, and optionally specify account and format.

Instructions

Fetch a single message with full body text and attachment metadata.

Args:

  • message_id (string, required): Gmail message id. Message ids are ACCOUNT-SPECIFIC — pass the same 'account' the id came from.

  • account (string, optional): email or alias. Omit for the default account.

  • response_format: 'markdown' (default) or 'json'.

Returns: normalized message (from/to/cc, date, subject, labels, body text) plus attachment metadata (filename, mimeType, size, attachment_id). Attachment CONTENT download is not supported in v1.

Examples:

  • {"message_id": "18c2f5a7b3d9e1f0"}

  • {"message_id": "18c2f5a7b3d9e1f0", "account": "personal", "response_format": "json"}

Error Handling: a 404 usually means the id belongs to a different account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNoEmail or alias of the account to use. Omit to use the default account. Call gmail_list_accounts if unsure.
message_idYesGmail message id (account-specific).
response_formatNoOutput format: 'markdown' for compact human-readable rendering (default), 'json' for the full normalized structure.markdown

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already establish read-only, idempotent, non-destructive behavior. The description adds meaningful behavioral context beyond that: message IDs are account-specific, attachment content download is not supported in v1, and a 404 usually indicates the ID belongs to a different account. These are non-obvious operational details that help an agent avoid mistakes.

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

Conciseness5/5

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

The description is compact and well-organized with clear sections: a one-sentence summary, Args, Returns, Examples, and Error Handling. Every section contributes practical information, and the most important caveat (account-specific IDs) is front-loaded.

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

Completeness5/5

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

There is no output schema, so the description appropriately lists what the normalized message contains and what attachment metadata is included. It also covers the main error case and parameter defaults. For a simple read-only fetch tool with three parameters, this is complete.

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. The description adds value by reinforcing the account-specific nature of message_id, explaining the response_format default and its effect, and giving concrete examples that clarify how parameters combine. This goes beyond the schema's own parameter descriptions.

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

Purpose5/5

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

The description opens with 'Fetch a single message with full body text and attachment metadata,' which is a specific verb plus resource and clearly distinguishes this from thread-level operations like gmail_get_thread. It also states what is included in the result, making the tool's purpose unambiguous.

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

Usage Guidelines4/5

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

The description makes clear this is for fetching a single message, implies account context matters, and provides examples showing typical calls. It does not explicitly say 'use gmail_get_thread for a full thread' or 'use gmail_search_threads for searching,' so it lacks an explicit exclusion, but the context is clear enough to guide selection.

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