Skip to main content
Glama

gmail_download_attachment

Read-onlyIdempotent

Save a Gmail attachment to a chosen local directory, or return its bytes or a link on managed installs. Identify it by the name from gmail_list_message_attachments; requires user approval.

Instructions

Download a Gmail attachment's content. Identify the attachment by the name returned from gmail_list_message_attachments. On a local install: saved to destination_dir, and the saved file path is returned -- destination_dir is required, there is no default, so choose deliberately: pass ~/Downloads (or another path the user asked for) when this attachment is a deliverable the user should find afterward, or your own working/scratch directory when you're only downloading it to read or process it yourself. On an organization-managed install: destination_dir is ignored (there is no local filesystem you and the human share) -- a small attachment's bytes come back directly in this tool's result so you can read or hand it to the human yourself; a larger one comes back as a one-time link the human opens in their own signed-in browser tab instead. Requires user approval.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonYesOne sentence: why are you calling this tool right now?
message_idYes
attachment_nameYes
destination_dirYesLocal install only: where to save the attachment -- required, no default. On an organization-managed install it is ignored and nothing is saved to it; any value will do. Use ~/Downloads (or a path the user specified) if the user should find this file afterward; use your own working/scratch directory if it's only for you to read or process.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.3.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint/idempotentHint/non-destructive, so the safety bar is low, yet the description adds substantial behavior: local vs organization-managed install handling, that destination_dir is ignored in org mode, small-attachment bytes vs a one-time human-opened link, and that user approval is required. This is rich context beyond the structured fields.

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 identification method, then the conditional destination_dir guidance. Every sentence carries information, though the local/org branching is dense and there is some overlap with the schema's destination_dir description.

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 and four required params, the description fills the gap by explaining what is returned (saved file path on local installs, inline bytes or a one-time link on org installs). Combined with the approval requirement and install-mode branching, 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 50%. The description meaningfully expands destination_dir (required, no default, ignored on org installs), matching the schema's own description. However message_id, attachment_name, and reason get no explanation in the description beyond context clues, so it only partially compensates for the coverage gap.

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+resource ('Download a Gmail attachment's content') and immediately distinguishes itself from the sibling gmail_list_message_attachments, which only identifies attachments. An agent can tell exactly what this does without opening the schema.

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?

Gives clear operational context: it names gmail_list_message_attachments as the source of attachment_name and tells the agent how to choose destination_dir deliberately (~/Downloads for a deliverable vs scratch dir for processing). It lacks an explicit 'do not use this for X' exclusion or a named alternative download path, so it falls short of a 5.

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