Skip to main content
Glama
gmail-mcp

gmail-mcp

get_thread_messages

List all messages in a Gmail thread by thread ID and return message IDs, subjects, senders, dates, and snippets so you can find the message ID needed to send a reply.

Instructions

List all messages in a thread by thread ID.

Returns message IDs, subjects, from addresses, dates, and snippets.
Use this to find the Gmail message ID needed by reply_email.

Required:
  thread_id (str) — the Gmail thread ID. Get this from list_emails
    or read_email (look for "thread_id" in responses).

Returns on success:
  {"thread_id": "...", "total": N, "messages": [
    {"id": "...", "subject": "...", "from": "...", "date": "...", "snippet": "..."}
  ]}

Workflow note: reply_email requires a Gmail message ID in the in_reply_to
  parameter — NOT an email Message-ID header. Use get_thread_messages
  to find the right message_id first. Example flow:
    1. list_emails(query="subject:my thread") → get thread_id
    2. get_thread_messages(thread_id) → get message_id
    3. reply_email(thread_id=..., in_reply_to=message_id, ...)

Input Schema

NameRequiredDescriptionDefault
thread_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does most of it: it discloses the return payload shape (thread_id, total, messages with id/subject/from/date/snippet) and implies read-only listing behavior. It stops short of stating pagination behavior, error conditions for an invalid thread_id, or whether message bodies are ever included beyond snippets.

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?

The content is front-loaded with purpose, then returns, then the parameter, then the workflow note, and every section carries information. There is mild redundancy between the "Required" block and the workflow example, and the example block makes the description longer than strictly necessary, but nothing is filler.

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?

For a single-parameter read tool with no output schema and no annotations, the description covers purpose, parameter sourcing, return shape, and cross-tool workflow. An agent has everything needed to call it correctly and to use its output in the next step.

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

Parameters5/5

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

Schema coverage is 0% and the single parameter is a bare "Thread Id" string, so the description must compensate — and it does, naming the type, explaining it is a Gmail thread ID, and telling the agent where to obtain it (list_emails or read_email, looking for the thread_id field in responses). This is meaning the schema does not provide.

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 first sentence states a specific verb and resource with scope: "List all messages in a thread by thread ID." It immediately distinguishes itself from sibling tools like list_emails and read_email, which operate at a different level of the mailbox hierarchy.

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

Usage Guidelines5/5

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

The description explicitly names the downstream use case (finding the Gmail message ID required by reply_email) and supplies a concrete three-step flow that routes through list_emails and reply_email. It also warns that reply_email needs a Gmail message ID rather than a Message-ID header, which is exactly the kind of exclusion that prevents wrong-tool selection.

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