Skip to main content
Glama

Gmail Read Emails

gmail_read_emails
Read-onlyIdempotent

Reads the content of up to 100 Gmail messages by ID when search results only provide snippets, returning bodies, metadata, attachments, and missing-ID details for follow-up processing.

Instructions

Read the content of one to 100 Gmail messages by ID, all at the same detail level. Use it after gmail_search_emails, gmail_get_mail_digest or gmail_check_mail_updates, which return only snippets; gmail_get_thread reads a whole conversation at once. Returns messages (id, thread_id, from, to, subject, date, snippet, label_ids, attachments with filename, mime_type, size and the download_id gmail_download_attachment takes, and, by format, body with truncated and next_offset), missing_count and missing_message_ids for IDs that no longer exist instead of failing the call, account_timezone, and count, has_more (always false), next_page_token and fetched_at.

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": {
      "message_ids": "<message_ids>"
    },
    "name": "gmail_read_emails"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNoBody detail: 'metadata' omits the body; 'preview' returns the first 1,000 characters of the cleaned body text; 'clean' returns the cleaned body text in pages of about 8,000 characters; 'full' returns the whole cleaned body unpaged plus the original text/plain part (text_body), the raw date header, internal_date and history_id under details and, with include_html, the HTML part.clean
offsetNoCharacter offset into the cleaned body text to resume from: the next_offset of a truncated 'preview' or 'clean' result; not a message index. It applies to every message in the call, so continue one message at a time; 'full' ignores it.
message_idsYesGmail message IDs, from gmail_search_emails, gmail_get_mail_digest, gmail_check_mail_updates or gmail_get_thread results.
include_htmlNoWith format='full' only: also return the original HTML part as html_body. Set it only when the markup itself is needed (layout, images, exact link targets with their query strings); newsletter HTML is often tens of kilobytes. When false, html_body is null and the readable text is in body.

Output Schema

NameRequiredDescriptionDefault
countNoNumber of items in this response.
formatNo
has_moreNoWhether another page is available.
messagesNo
fetched_atNoRFC3339 time when this response was fetched.
missing_countNo
next_page_tokenNoOpaque token for the next page, or null.
account_timezoneNo
missing_message_idsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.2.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), but the description adds genuinely non-obvious behavior: nonexistent IDs come back as missing_count/missing_message_ids rather than failing the whole call, and offset applies to every message in the request so paging must continue one message at a time. It also discloses that has_more is always false. Minor gap: it does not warn about rate/batch cost for 100-message calls, but the fail-soft and paging caveats are the important disclosures.

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 first sentence is front-loaded and efficient, but the long return-value enumeration (id, thread_id, from, to, subject, snippet, label_ids, attachments, body, account_timezone, count, next_page_token, fetched_at) restates what the output schema already provides. That tail is bulky relative to the decision-relevant guidance it surrounds.

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 4-parameter read tool with full schema coverage, an output schema, and complete annotations, the description supplies everything an agent needs: when to call it, what detail levels mean, how paging works, and how missing IDs are handled. Since an output schema exists, the field-by-field return listing is redundant rather than necessary, which keeps it from a 5.

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% and the enum for format is already well documented, so baseline is 3; the description earns an extra point by adding "all at the same detail level," which clarifies that format and offset are call-wide rather than per-message. It adds framing the schema alone does not make obvious, though it repeats the download_id/format coupling already present in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Read the content of one to 100 Gmail messages by ID, all at the same detail level" gives a specific verb, resource, and scope, and immediately names the differentiator against gmail_get_thread (whole conversation vs. individual messages). An agent can distinguish it from the snippet-returning siblings without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states the ordering dependency: call this after gmail_search_emails, gmail_get_mail_digest or gmail_check_mail_updates because those return only snippets, and contrasts it with gmail_get_thread for full-conversation reads. The when-to-use and the alternative are both spelled out.

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