Skip to main content
Glama

batchGetThreads

Retrieve multiple email threads by ID in parallel, with formats for clean, full, or metadata views and limits that control quoted history and total response size.

Instructions

Get multiple threads by ID in parallel. 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 limits decoded text bodies with maxBodyChars. maxResponseChars bounds the aggregate response size across all requested threads combined: whole threads are dropped from the end of the ids list first, then each retained thread is capped individually, with truncation reported on the last returned thread (batchResponseTruncated/totalThreadsRequested/includedThreads/truncationNote).

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": {
      "ids": "<ids>"
    },
    "name": "batchGetThreads"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsYesThe IDs of the threads to retrieve
formatNoResponse format for each message: clean (default), metadata (headers only), or full (raw MIME tree)clean
maxMessagesNoOnly include the latest N messages per thread. Omit for all. 0 or a negative value means unlimited. Fractional values are floored.
maxBodyCharsNoMax 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.
includeQuotedNoIn 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.
includeBodyHtmlNoIn full mode only: whether to include parsed HTML body parts
maxResponseCharsNoWhole-response character budget across every requested thread combined (unlike maxBodyChars, which only caps each message independently, and applies per-thread besides). When exceeded, whole threads are dropped from the end of the ids list first; each retained thread is also capped individually. Truncation is reported on the last returned thread via batchResponseTruncated/totalThreadsRequested/includedThreads/truncationNote, and per-thread when an individual thread's messages were cut. Default 100000. 0 = unlimited.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.0-rc.1

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses parallel fetching, the conservative ambiguous-quote policy with its flag names, and the exact truncation order (whole threads dropped from the end of the ids list first, then per-thread caps). It omits error behavior for unknown IDs and whether results are returned in requested order.

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?

Front-loaded with purpose, then behavior, then limits — a sensible order with no filler sentences. It is dense and runs long, partly because the maxResponseChars sentence re-explains what the schema already documents.

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?

For a 7-parameter batch tool with no output schema, the description usefully names the truncation and ambiguity flags an agent will see in responses. Gaps remain around invalid-ID handling and result ordering, which matter for a batch call whose ids list can be partially dropped.

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 100% and the schema descriptions are already verbose, so the baseline is 3. The description reinforces the key distinction between maxBodyChars (per-message) and maxResponseChars (aggregate, with drop ordering), but this is largely restated from the schema rather than adding new meaning.

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?

"Get multiple threads by ID in parallel" gives a specific verb, resource, and batching scope, which separates it from the singular getThread without needing to name it. It stops short of explicitly contrasting with listThreads or getThread, so an agent must infer that this is the ID-driven bulk path.

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 description explains the clean-vs-full behavioral tradeoff and even gives a selection rule inside the param text ("Use this if quotedHistoryAmbiguous keeps showing up"), but it never states when to pick this tool over getThread, batchGetMessages, or listThreads. Usage is implied by the tool's shape 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