Tool: get_thread
Retrieves a specific email thread from the authenticated user's Gmail account, including a list of its messages.
The following sample demonstrate how to use curl
to invoke the get_thread
MCP tool.
| Curl Request |
|---|
curl --location 'https://gmailmcp.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "get_thread", "arguments": { // provide these details according to the tool MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request message for GetThread RPC.
GetThreadRequest
| JSON representation |
|---|
{
"threadId"
:
string
,
"messageFormat"
:
enum (
|
| Fields | |
|---|---|
threadId
|
Required. The unique identifier of the thread to fetch. |
messageFormat
|
Optional. Specifies the format of the messages returned within the thread. Defaults to FULL_CONTENT. |
Output Schema
Thread containing a list of messages.
Thread
| JSON representation |
|---|
{
"id"
:
string
,
"messages"
:
[
{
object (
|
| Fields | |
|---|---|
id
|
The unique identifier of the thread. |
messages[]
|
A list of messages in the thread, ordered chronologically. |
Message
| JSON representation |
|---|
{ "id" : string , "snippet" : string , "subject" : string , "sender" : string , "toRecipients" : [ string ] , "ccRecipients" : [ string ] , "date" : string , "plaintextBody" : string } |
| Fields | |
|---|---|
id
|
The unique identifier of the message. |
snippet
|
Snippet of the message body. |
subject
|
The message subject extracted from headers: |
sender
|
Sender email address. |
toRecipients[]
|
To recipient email addresses. |
ccRecipients[]
|
CC recipient email addresses. |
date
|
Date of the message in ISO 8601 format (YYYY-MM-DD). |
plaintextBody
|
Full body content, only populated if MessageFormat was FULL_CONTENT. |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌

