MCP Tools Reference: gmailmcp.googleapis.com

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/v1' \
--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's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

Input Schema

Request message for GetThread RPC.

GetThreadRequest

JSON representation
{
  "threadId": string,
  "messageFormat": enum (MessageFormat)
}
Fields
threadId

string

Required. The unique identifier of the thread to fetch.

messageFormat

enum (MessageFormat)

Optional. Specifies the format of the messages returned within the thread. Defaults to FULL_CONTENT. Note: If you need body content or attachments, use FULL_CONTENT. When using MINIMAL, the plaintext_body and attachment_ids fields will not be populated. If you are unsure which format to use, rely on the default behavior by using FULL_CONTENT.

MessageFormat

Enum to control the level of detail for messages in the thread.

Enums
MESSAGE_FORMAT_UNSPECIFIED Defaults to FULL_CONTENT.
MINIMAL Returns message snippets and key headers (Subject, From, To, Cc, Date).
FULL_CONTENT Returns all information in "MINIMAL" plus the full body content of each message.

Output Schema

Thread containing a list of messages.

Thread

JSON representation
{
  "id": string,
  "messages": [
    {
      object (Message)
    }
  ]
}
Fields
id

string

The unique identifier of the thread.

messages[]

object (Message)

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,
  "attachmentIds": [
    string
  ]
}
Fields
id

string

The unique identifier of the message.

snippet

string

Snippet of the message body.

subject

string

The message subject extracted from headers:

sender

string

Sender email address.

toRecipients[]

string

To recipient email addresses.

ccRecipients[]

string

CC recipient email addresses.

date

string

Date of the message in ISO 8601 format (YYYY-MM-DD).

plaintextBody

string

Full body content, only populated if MessageFormat was FULL_CONTENT.

attachmentIds[]

string

Output only. The attachment ids, only populated if MessageFormat was FULL_CONTENT.

Tool Annotations

Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌