Skip to main content
Glama
Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

Get Gmail Messages Content Batch

get_gmail_messages_content_batch
Read-onlyIdempotent

Retrieves the content of multiple Gmail messages in a single batch request (up to 25 per batch) to avoid SSL connection exhaustion; supports full-body or metadata formats.

Instructions

Retrieves the content of multiple Gmail messages in a single batch request. Supports up to 25 messages per batch to prevent SSL connection exhaustion.

Input Schema

NameRequiredDescriptionDefault
formatNoMessage format. "full" includes body, "metadata" only headers.full
body_formatNoBody output format (only applies when format='full'). 'text' (default) returns plaintext (HTML converted to text as fallback). 'html' returns the raw HTML body as-is without conversion. 'raw' fetches the full raw MIME message and returns the base64url-decoded content.text
message_idsYesList of Gmail message IDs to retrieve; fetched in batches of 25.
include_linksNoWhen True, append a LINKS section listing the http(s) URLs from the HTML body that the text output omits. Only applies to body_format='text'.
user_google_emailYesThe user's Google email address. Required.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.2.0
    • addedInput schema / properties / include_links
      Added value: +{
      +  "default": false,
      +  "description": "When True, append a LINKS section listing the http(s) URLs from the HTML body that the text output omits. Only applies to body_format='text'.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / message_ids / description
      Previous value: -"List of Gmail message IDs to retrieve (max 25 per batch)."New value: +"List of Gmail message IDs to retrieve; fetched in batches of 25."
  2. Changed12 schema fields changedv1.0.1
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / body_format
      Added value: +{
      +  "default": "text",
      +  "description": "Body output format (only applies when format='full'). 'text' (default) returns plaintext (HTML converted to text as fallback). 'html' returns the raw HTML body as-is without conversion. 'raw' fetches the full raw MIME message and returns the base64url-decoded content.",
      +  "enum": [
      +    "text",
      +    "html",
      +    "raw"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / format / description
      Added value: +"Message format. \"full\" includes body, \"metadata\" only headers."
    • removedInput schema / properties / format / title
      Removed value: -"Format"
    • addedInput schema / properties / message_ids / description
      Added value: +"List of Gmail message IDs to retrieve (max 25 per batch)."
    • removedInput schema / properties / message_ids / title
      Removed value: -"Message Ids"
    • removedInput schema / properties / service
      Removed value: -{
      -  "title": "service",
      -  "type": "string"
      -}
    • addedInput schema / properties / user_google_email / description
      Added value: +"The user's Google email address. Required."
    • removedInput schema / properties / user_google_email / title
      Removed value: -"User Google Email"
    • changedInput schema / required
      Previous value: -[
      -  "service",
      -  "message_ids",
      -  "user_google_email"
      -]New value: +[
      +  "message_ids",
      +  "user_google_email"
      +]
    • removedInput schema / title
      Removed value: -"get_gmail_messages_content_batchArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "result": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "type": "object",
      +  "x-fastmcp-wrap-result": true
      +}
  3. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare the safe read-only, open-world, idempotent, non-destructive behavior. The description adds a meaningful operational constraint: batches are capped at 25 messages to prevent SSL connection exhaustion, which is useful behavioral context beyond the annotations.

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

Conciseness5/5

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

The description is two sentences, front-loads the tool's purpose, and follows with the batch-size constraint. Every sentence contributes useful information with no wasted text.

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?

Given the rich annotations, complete input schema, and presence of an output schema, the description supplies enough context for correct invocation. It covers the batch purpose and the 25-message limit, though it does not discuss error handling or partial-failure behavior.

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 description coverage is 100%, so all five parameters, including format, body_format, include_links, message_ids, and user_google_email, are already documented in the schema. The description adds only the batch-size context and does not need to carry parameter semantics here.

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?

The description states a specific verb and resource: retrieving content of multiple Gmail messages in a single batch request. It clearly signals batch scope, distinguishing it from single-message retrieval, but it does not explicitly name or contrast with sibling tools such as get_gmail_message_content.

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 word 'multiple' and the batch framing imply this tool is for fetching several messages at once, rather than single-message or thread retrieval. However, there is no explicit when-to-use guidance, exclusions, or named alternatives.

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