Skip to main content
Glama

batchGetMessages

Retrieve multiple Gmail messages by ID in parallel, choosing clean, metadata, or full format to trim quoted history and cap decoded body length per message.

Instructions

Get multiple messages by ID in parallel. Clean mode removes quoted reply history; full mode limits decoded text bodies with maxBodyChars.

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": "batchGetMessages"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsYesThe IDs of the messages to retrieve
formatNoResponse format: clean (default), metadata (headers only), or full (raw MIME tree)clean
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: include quoted reply history. Default false.
includeBodyHtmlNoIn full mode only: whether to include parsed HTML body parts

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.0-rc.1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It usefully discloses parallel execution and that clean mode strips quoted reply history, but says nothing about behavior on invalid or missing IDs, result ordering, partial failures, or size of the combined response.

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?

Two compact sentences with the core operation front-loaded and mode semantics following. Slightly terse rather than padded—no wasted words, though the mode clause compresses several conditional behaviors into one line.

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?

For a five-parameter batch tool with no annotations and no output schema, the description covers the main modes but omits result ordering, handling of bad IDs, and what an empty or oversized batch returns. Adequate for calling it, incomplete for anticipating its behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description does add real semantic linkage: it ties 'clean' to removal of quoted history and 'full' to the maxBodyChars-limited decoded bodies, clarifying how format interacts with maxBodyChars beyond the per-parameter text.

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 ('Get multiple messages by ID') and adds 'in parallel,' which distinguishes it from a single-message getter and from thread-level retrieval. It stops short of naming the sibling to use instead, but the multi-ID batching scope is unmistakable.

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?

Usage is only implied: the agent can infer this is the tool for fetching several known message IDs at once. There is no explicit guidance on when to prefer getMessage for a single ID, listMessages for discovery, or batchGetThreads for thread-level retrieval.

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