Skip to main content
Glama

download_attachment

Read-only

Download one Gmail attachment's raw bytes as base64 (binary-safe — images, PDFs, etc.). Pass message_id and attachment_id from get_thread's messages[].attachments (each has attachment_id/filename/mime_type/size — check size there before downloading). Hard-capped at 5MB; larger attachments error rather than silently truncating. Needs only gmail.readonly (no reconnect). Pass account when more than one Gmail account is connected.

Input Schema

NameRequiredDescriptionDefault
accountNoAccount label the message belongs to. Required when several Gmail accounts are connected.
message_idYesGmail message id (from get_thread's messages[].id).
attachment_idYesAttachment id (from get_thread's messages[].attachments[].attachment_id).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Adds substantial behavior beyond readOnlyHint=true: the 5MB hard cap, that oversized attachments error rather than silently truncating, the returned encoding (base64), and that only gmail.readonly is required with no reconnect. These are exactly the operational facts an agent needs before invoking.

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?

Front-loaded with the core action and encoding, then the sourcing instructions and limits. Dense and mostly waste-free, though the parenthetical about attachment fields is slightly redundant with the schema.

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?

With no output schema, the description correctly carries the return-value burden by naming base64 raw bytes, and it also covers the failure mode (5MB error) and auth scope. An agent has everything needed to call it correctly.

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 coverage is 100% and the schema already documents message_id, attachment_id, and account including their get_thread provenance, so the description largely restates structured data. The added value is marginal — the reminder to check size before downloading is the only extra meaning.

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 ('Download one Gmail attachment's raw bytes as base64') and immediately scopes it with 'binary-safe — images, PDFs, etc.'. This clearly distinguishes it from read_thread, read_slack_file, and download_file_content, which are the nearest siblings.

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?

Explicitly routes the agent to get_thread's messages[].attachments as the source of the required IDs and advises checking size there before downloading, plus the account requirement when multiple accounts are connected. Clear context is given, though no explicit 'do not use this when...' exclusion or named alternative is stated.

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