Skip to main content
Glama
Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

Get Gmail Thread Content

get_gmail_thread_content
Read-onlyIdempotent

Retrieves a complete Gmail thread with all messages and optional ownership analysis to identify the last sender and who owes a 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

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_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_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

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.2.0
    • addedInput schema / properties / include_links
      Added value: +{
      +  "default": false,
      +  "description": "When 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'.",
      +  "type": "boolean"
      +}
  2. Changed11 schema fields changedv1.0.1
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / body_format
      Added value: +{
      +  "default": "text",
      +  "description": "Body 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.",
      +  "enum": [
      +    "text",
      +    "html",
      +    "raw"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / include_analysis
      Added value: +{
      +  "default": false,
      +  "description": "When 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.",
      +  "type": "boolean"
      +}
    • removedInput schema / properties / service
      Removed value: -{
      -  "title": "service",
      -  "type": "string"
      -}
    • addedInput schema / properties / thread_id / description
      Added value: +"The unique ID of the Gmail thread to retrieve."
    • removedInput schema / properties / thread_id / title
      Removed value: -"Thread Id"
    • addedInput schema / properties / user_google_email / description
      Added value: +"The user's Google email address. Required."
    • removedInput schema / properties / user_google_email / title
      Removed value: -"User Google Email"
    • changedInput schema / required
      Previous value: -[
      -  "service",
      -  "thread_id",
      -  "user_google_email"
      -]New value: +[
      +  "thread_id",
      +  "user_google_email"
      +]
    • removedInput schema / title
      Removed value: -"get_gmail_thread_contentArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "result": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "additionalProperties": true,
      +          "type": "object"
      +        }
      +      ]
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "type": "object",
      +  "x-fastmcp-wrap-result": true
      +}
  3. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/destructiveHint=false, so safety is covered. The description adds genuinely non-redundant behavior: enabling include_analysis changes the return type to a dict with ownership analysis, which matters for callers writing downstream code. It does not cover pagination or size limits on large threads, keeping it below a 5.

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?

Two short sentences, front-loaded with the core action, and the optional capability follows. The second sentence is slightly verbose ('without re-parsing the formatted string or making a second tool call') but it does convey the practical payoff, so nothing is wasted outright.

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, rich annotations, and 100% schema coverage, the description only needs to convey purpose and the conditional return-shape behavior, which it does. Residual gaps (large-thread behavior, attachment handling) are minor for a read-only fetch tool.

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 all five parameters including the body_format enum and include_links are fully documented structurally. The description only restates the include_analysis outcome already present in the schema, adding little beyond baseline; a 3 is appropriate.

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 complete content of a Gmail conversation thread, including all messages'), which implicitly separates it from single-message siblings like get_gmail_message_content. However, it never names a sibling or asserts the distinction, so 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 mention of getting ownership analysis 'without... making a second tool call' hints at when the include_analysis option is worth enabling. But there is no explicit guidance on when to use this thread tool versus get_gmail_message_content or get_gmail_threads_content_batch, which are both plausible alternatives in the sibling list.

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