Skip to main content
Glama

Read an email attachment

read_gmail_attachment

Open one attachment of a Gmail message and return what is in it. Text, CSV, JSON, HTML and code files come back as themselves; images come back as pictures the assistant can look at. PDFs, spreadsheets and Word files can't be read yet — but any attachment can be saved as-is with save_gmail_attachment_to_drive. Attachments up to 10 MB. Get attachmentId from get_gmail_message or get_gmail_thread.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mailboxYesEmail address of the connected Gmail/Google Workspace mailbox to act on. Call list_authorized_mailboxes to see available options.
messageIdYes
attachmentIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of disclosing behavior. It explains return types ('Text, CSV, JSON, HTML and code files come back as themselves; images come back as pictures'), states unsupported formats, and gives a size limit. This goes beyond basic purpose and informs the agent what to expect. It doesn't cover error behavior, but for a read operation this is sufficient.

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 a compact three sentences with no redundant filler. It front-loads the purpose, then formats, then limitations and alternative, then size and source. Every sentence earns its place, and the structure is logical and easy to scan.

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?

Despite having no output schema or annotations, the description covers the essential information: what formats are returned, what cannot be read, an alternative for unsupported types, the size limit, and where to obtain the attachment ID. For a simple read tool, this is nearly complete. Missing details like error handling or pagination are not critical for this action.

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?

The input schema describes only 'mailbox' (33% coverage). The description adds a hint for 'attachmentId' ('Get attachmentId from get_gmail_message or get_gmail_thread') which is not in the schema. However, 'messageId' is left unexplained, and the description does not elaborate on mailbox beyond the schema. It partially compensates for the schema coverage gap but not fully.

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?

The description opens with 'Open one attachment of a Gmail message and return what is in it,' which is a specific verb (open/read) applied to a clear resource (a Gmail attachment). It distinguishes from siblings like read_outlook_attachment and save_gmail_attachment_to_drive by stating the action and the limitation for unsupported formats. The purpose is unmistakable and differentiates the tool from others in the list.

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

Usage Guidelines4/5

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

It provides explicit guidance: 'Get attachmentId from get_gmail_message or get_gmail_thread,' a size limit of 10 MB, and a clear alternative: 'PDFs, spreadsheets and Word files can't be read yet — but any attachment can be saved as-is with save_gmail_attachment_to_drive.' This tells the agent when to use this tool and when to use the alternative, though it could be more explicit about when not to use it in favor of other read tools (e.g., read_gdrive_file), but that is not a direct sibling for attachments.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources