Skip to main content
Glama

Get Gmail Thread Content

get_gmail_thread_content
Read-onlyIdempotent

Retrieve a complete Gmail conversation thread, including all messages, and optionally get ownership analysis to see who sent the last message and who needs to reply.

Instructions

Retrieves the complete content of a Gmail conversation thread, including all messages.

Optionally also returns structured ownership analysis so a caller can determine who sent the last message and who owes whom a response without re-parsing the formatted string or making a second tool call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thread_idYesThe unique ID of the Gmail thread to retrieve.
body_formatNoBody output format. 'text' (default) returns plaintext (HTML converted to text as fallback). 'html' returns the raw HTML body as-is without conversion. 'raw' fetches each message's full raw MIME content and returns the base64url-decoded body.text
include_analysisNoWhen True, the return value is a dict with both the formatted thread content AND structured ownership analysis (last sender, ball-in-court verdict, per-sender message counts, participants). Defaults to False, in which case the existing string return shape is preserved.
user_google_emailYesThe user's Google email address. Required.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish the safety profile (readOnlyHint, idempotentHint, non-destructive, openWorld), so the bar for the description is lower. The description adds meaningful behavioral context beyond annotations: the tool returns ALL messages in the thread, and the include_analysis flag flips the return shape from a formatted string to a structured dict containing last sender, ball-in-court verdict, per-sender counts, and participants. This explains behavior the annotations cannot convey and does not contradict them.

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?

Two sentences with zero waste: the first states the core function, the second explains the optional value-add and its benefit. The efficiency framing ('without re-parsing the formatted string or making a second tool call') earns its place by clarifying why the optional feature exists. Front-loaded, appropriately sized, no filler.

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 an output schema present, return-value documentation is handled elsewhere; annotations cover the read-only/idempotent profile; and the schema covers all parameters at 100%. The description is complete for the core task. The only meaningful gap is explicit routing to sibling alternatives (batch vs. single vs. message-level), which would round out the contextual picture but is not critical given the clear thread-scoped purpose.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all four parameters thoroughly, including defaults and enum semantics for body_format and include_analysis. Per the baseline rule, the description needn't repeat this. It adds marginal value by explaining the intent behind include_analysis ('who owes whom a response') but provides no additional meaning for thread_id, body_format, or user_google_email beyond what the schema already states.

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 a specific verb+resource: 'Retrieves the complete content of a Gmail conversation thread, including all messages.' This clearly distinguishes it from siblings like get_gmail_message_content (single message) and search_gmail_messages (search), and the second sentence's ownership-analysis feature further differentiates it from get_gmail_threads_content_batch.

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 a use case — 'so a caller can determine who sent the last message and who owes whom a response... without making a second tool call' — which tells the agent when the optional analysis is valuable. However, it never explicitly addresses when NOT to use this tool or names alternatives (e.g., use get_gmail_threads_content_batch for multiple threads, get_gmail_message_content for one message). The guidance is implied, not stated.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/WorldCentralKitchen/google_workspace_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server