Skip to main content
Glama

Read a Gmail attachment

read_gmail_attachment
Read-only

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

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.9/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly, non-destructive, closed-world), and the description adds context the annotations cannot: a 10 MB size ceiling, the per-format behavior of the return value, and the set of formats that will fail outright. This is exactly the extra behavioral detail the annotations leave out.

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?

Four sentences, front-loaded with the action, then format support, then the failure/alternative path, then the size limit and ID provenance. No filler and every sentence carries information an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description carries the return-value burden and does it well by describing what each format comes back as. Combined with the size limit, format exclusions, alternative tool, and ID source, it covers everything needed to call the tool correctly.

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 only 33% (only mailbox is documented in the schema), so the description must compensate. It does for the hardest parameter by explaining where attachmentId comes from (get_gmail_message or get_gmail_thread), but messageId is never mentioned in either place and its relationship to mailbox is left implicit.

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?

States a specific verb and resource ('Open one attachment of a Gmail message and return what is in it') and scopes it to Gmail, which cleanly separates it from read_outlook_attachment, read_agentmail_attachment and read_gdrive_file. An agent can pick this tool without opening a 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 supported formats, states what is NOT supported (PDFs, spreadsheets, Word), and routes the agent to the alternative for those cases ('any attachment can be saved as-is with save_gmail_attachment_to_drive'). It also names the prerequisite tools for obtaining attachmentId.

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