Skip to main content
Glama

gmail.users.threads.get

Retrieve a specific Gmail thread by ID and return its messages as JSON in full, metadata, or minimal format for thread inspection.

Instructions

Gets the specified thread. For more information, see Manage threads [HTTP GET]. Returns the requested resource as JSON — request bodies are built from the typed parameters (typed flags win over the params map), or read whole from body_file Siblings over the same resource: delete, list, modify, trash, untrash.

Input Schema

NameRequiredDescriptionDefault
idYes[URL path segment] The ID of the thread to retrieve.
queryNoExtra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe.
formatNo[query parameter] The format to return the messages in. Values: `full` = Returns the full email message data with body content parsed in the `payload` field; the `raw` field is not used. Format cannot be used when accessing the api using the gmail.metadata scope.; `metadata` = Returns only email message IDs, labels, and email headers.; `minimal` = Returns only email message IDs and labels; does not return the email headers, body, or payload..full
paramsNoParameter map merged into the request; typed parameters win.
userIdYes[URL path segment] The user's email address. The special value `me` can be used to indicate the authenticated user.me
dry_runNoReturn the request that would be sent, without sending it.
body_fileNoRead the request body from this file ('-' for stdin) instead of building one from the parameters.
metadataHeadersNo

Output Schema

NameRequiredDescriptionDefault
idNo
snippetNo
messagesNo
historyIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / format / default
      Added value: +"full"
    • changedInput schema / properties / format / description
      Previous value: -"The format to return the messages in."New value: +"[query parameter] The format to return the messages in. Values: `full` = Returns the full email message data with body content parsed in the `payload` field; the `raw` field is not used. Format cannot be used when accessing the api using the gmail.metadata scope.; `metadata` = Returns only email message IDs, labels, and email headers.; `minimal` = Returns only email message IDs and labels; does not return the email headers, body, or payload.."
    • changedInput schema / properties / id / description
      Previous value: -"The ID of the thread to retrieve."New value: +"[URL path segment] The ID of the thread to retrieve."
    • changedInput schema / properties / metadataHeaders / items / description
      Previous value: -"When given and format is METADATA, only include headers specified."New value: +"[query parameter] When given and format is METADATA, only include headers specified."
    • addedInput schema / properties / userId / default
      Added value: +"me"
    • changedInput schema / properties / userId / description
      Previous value: -"The user's email address. The special value `me` can be used to indicate the authenticated user."New value: +"[URL path segment] The user's email address. The special value `me` can be used to indicate the authenticated user."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "historyId": {
      +      "type": "string"
      +    },
      +    "id": {
      +      "type": "string"
      +    },
      +    "messages": {
      +      "items": {
      +        "properties": {
      +          "classificationLabelValues": {
      +            "items": {
      +              "properties": {
      +                "fields": {
      +                  "items": {
      +                    "properties": {
      +                      "fieldId": {
      +                        "type": "string"
      +                      },
      +                      "selection": {
      +                        "type": "string"
      +                      }
      +                    },
      +                    "type": "object"
      +                  },
      +                  "type": "array"
      +                },
      +                "labelId": {
      +                  "type": "string"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "historyId": {
      +            "type": "string"
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "internalDate": {
      +            "type": "string"
      +          },
      +          "labelIds": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "payload": {
      +            "properties": {
      +              "body": {
      +                "properties": {
      +                  "attachmentId": {
      +                    "type": "string"
      +                  },
      +                  "data": {
      +                    "type": "string"
      +                  },
      +                  "size": {
      +                    "type": "integer"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "filename": {
      +                "type": "string"
      +              },
      +              "headers": {
      +                "items": {
      +                  "properties": {
      +                    "name": {
      +                      "type": "string"
      +                    },
      +                    "value": {
      +                      "type": "string"
      +                    }
      +                  },
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "mimeType": {
      +                "type": "string"
      +              },
      +              "partId": {
      +                "type": "string"
      +              },
      +              "parts": {
      +                "items": {
      +                  "properties": {
      +                    "body": {
      +                      "type": "object"
      +                    },
      +                    "filename": {
      +                      "type": "string"
      +                    },
      +                    "headers": {
      +                      "items": {
      +                        "type": "object"
      +                      },
      +                      "type": "array"
      +                    },
      +                    "mimeType": {
      +                      "type": "string"
      +                    },
      +                    "partId": {
      +                      "type": "string"
      +                    },
      +                    "parts": {
      +                      "items": {
      +                        "type": "object"
      +                      },
      +                      "type": "array"
      +                    }
      +                  },
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "raw": {
      +            "type": "string"
      +          },
      +          "sizeEstimate": {
      +            "type": "integer"
      +          },
      +          "snippet": {
      +            "type": "string"
      +          },
      +          "threadId": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "snippet": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose that this is an HTTP GET returning JSON. However, the boilerplate about request bodies and body_file is irrelevant to a GET and adds noise rather than context (scopes, permission needs, or behavior when the thread ID doesn't exist).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in the first sentence, but the middle clause about request bodies/body_file is templated filler for a read tool and dilutes focus. The trailing sibling list is useful but unannotated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values needn't be explained. But with no annotations covering safety or side effects, the description should say more about behavior for this read tool (e.g., scope requirements, error behavior), and instead spends space on irrelevant body-construction boilerplate.

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 coverage is 88%, so the schema already documents userId, id, format, metadataHeaders, etc. The description adds only the generic 'typed flags win over params' note and body_file behavior, without clarifying any specific parameter semantics beyond the schema.

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 ('Gets the specified thread') and lists the sibling operations over the same resource (delete, list, modify, trash, untrash), which lets an agent distinguish this from them. It falls short of a 5 because the siblings are only named, not contrasted.

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 sibling list implies the boundary (get vs list/modify/trash), but the description never explicitly says when to choose this over them or what prerequisites exist. Usage is inferable from the name and the HTTP GET marker rather than stated.

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