Skip to main content
Glama

getMessage

Retrieves a Gmail message by ID in clean, metadata, or full MIME format, with options to include quoted replies and limit decoded body characters.

Instructions

Get a specific message by ID. Clean mode removes quoted reply history by default. Full mode returns the raw MIME tree with decoded text bodies limited by maxBodyChars.

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": {
      "id": "<id>"
    },
    "name": "getMessage"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe ID of the message to retrieve
formatNoResponse format: clean (default), metadata (headers only), or full (raw MIME tree)clean
maxBodyCharsNoMax decoded chars per text body — the message body in clean mode, each MIME text part in full mode; not a whole-response cap. Truncated text carries bodyTruncated + totalChars; oversized undecoded parts (e.g. HTML) are omitted with a totalChars note. 0 = unlimited.
includeQuotedNoIn clean mode: include quoted reply history. Default false.
includeBodyHtmlNoIn full mode only: whether to include parsed HTML body parts

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.0-rc.1

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It usefully discloses that clean mode strips quoted reply history by default and that truncation can occur via maxBodyChars, but says nothing about permission requirements, behavior when the ID is unknown or deleted, or whether the call is side-effect free.

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 short sentences, front-loaded with the core action, then the default mode, then the full mode. Nothing is filler, though the clean-mode sentence largely restates the schema's `includeQuoted` default.

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?

With only five parameters, full schema coverage, and no output schema to explain, the description covers what an agent needs to call this correctly. The main shortfall is that the third response format (`metadata`) and the full-mode HTML toggle are never acknowledged in prose.

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 a 3 is the baseline, and the description adds real interpretive value by explaining the interaction between `format` and `maxBodyChars` (bodies are decoded and capped per text body). It omits the `metadata` format and `includeBodyHtml` that appear in the schema, so the added meaning is incomplete.

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 ("Get a specific message by ID") and immediately characterizes the payload variants, so the agent knows this is a single-message fetch rather than a batch or thread operation. It does not explicitly name a sibling alternative to contrast with, which keeps it short of a 5.

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 implies when to pick clean vs. full mode by describing what each returns, and the schema supplies the `metadata` option. It gives no explicit guidance on when to prefer this over getThread or batchGetMessages, and no exclusions or prerequisites.

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