getThread
Retrieve an email thread by ID to read its messages as cleaned text, headers only, or raw MIME. Control quoted history, per-body and total size limits, and fetch only the latest messages or specific IDs.
Instructions
Get a specific thread by ID. Clean mode removes quoted reply history when it can be safely identified; an ambiguous Outlook-style quote (no ">" prefixes to mark where it ends) is left in the body rather than guessed at, and flagged via quotedHistoryAmbiguous/quotedHistoryNote. Full mode returns raw MIME trees with decoded text bodies limited by maxBodyChars. Use maxMessages (latest N) or messageIds to fetch only the messages you need. Note: maxBodyChars caps each message body independently, not the total response size. maxResponseChars bounds the aggregate response and truncates (keeping the latest messages) with a truncationNote when the thread is too large.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>"
},
"name": "getThread"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The ID of the thread to retrieve | |
| format | No | Response format for each message: clean (default), metadata (headers only), or full (raw MIME tree) | clean |
| messageIds | No | Only include messages with these IDs in the thread response. An empty array is treated as no filter. | |
| maxMessages | No | Only include the latest N messages of the thread (applied after messageIds). Omit for all. 0 or a negative value means unlimited. Fractional values are floored. Use 1-2 for the usual 'just the latest reply' case. | |
| maxBodyChars | No | Max decoded chars per text body — per message in clean mode, per MIME text part in full mode; not a whole-response cap. Oversized undecoded parts (e.g. HTML) are omitted with a totalChars note. 0 = unlimited. | |
| includeQuoted | No | In clean mode: skip quote detection entirely and always return the full body, including any quoted reply history. Default false. Use this if quotedHistoryAmbiguous keeps showing up and you'd rather have the full text every time than a per-message flag. | |
| includeBodyHtml | No | In full mode only: whether to include parsed HTML body parts | |
| maxResponseChars | No | Whole-response character budget across all messages combined (unlike maxBodyChars, which only caps each message independently). When exceeded, the oldest messages are dropped (keeping the latest) and the response reports responseTruncated/totalMessages/includedMessages/truncationNote. Default 100000. 0 = unlimited. |