Skip to main content
Glama
dipseth

google-workspace-unlimited

Gmail Attachment Download

download_gmail_attachment
Idempotent

Retrieve a specific attachment from a Gmail message. Get a temporary download URL, save to disk, or receive base64 content.

Instructions

Download a specific attachment from a Gmail message. By default returns a temporary signed download URL (15 min, one-time use). Set return_url=false to save to disk, or return_content=true for base64. First use get_gmail_message_content to list attachments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYesThe attachment filename from get_gmail_message_content response
save_dirNoDirectory to save the attachment to. Defaults to ~/Downloads. Only used when return_url and return_content are both false.
message_idYesThe Gmail message ID that contains the attachment
return_urlNoIf true (default), return a temporary signed download URL (15 min, one-time use). Best for remote clients. Set to false to use save_dir or return_content instead.
return_contentNoIf true, return base64-encoded file content instead of saving to disk. Only used when return_url is false.
user_google_emailNoUse 'me' or 'myself' for auto-resolution to authenticated user, or provide specific email address. If None, uses current authenticated user (auto-injected by middleware).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
sizeNo
errorNo
successYes
filenameNo
mimeTypeNo
file_pathNo
userEmailYes
message_idNo
download_urlNo
attachment_idNo
Behavior5/5

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

The description fully discloses behavioral traits: default returns a 15-minute one-time-use temporary signed URL, options to save to disk or return base64 content, and default save directory. Annotations (readOnlyHint=false, destructiveHint=false) align with description, and no contradictions exist.

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 three sentences with zero wasted words. It front-loads the core purpose and default, then covers alternatives and prerequisite in a logical order.

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?

Given the tool's complexity (6 parameters, boolean logic, multiple output modes), the description is complete. It covers all behaviors, prerequisites, and edge cases (e.g., default save directory). The presence of an output schema is noted, but description adequately explains return values without needing schema details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the description adds significant meaning beyond the schema. It explains the interplay between return_url, return_content, and save_dir, clarifies the default for save_dir, and provides guidance on user_google_email values (e.g., 'me' or 'myself').

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 clearly states the tool's purpose: 'Download a specific attachment from a Gmail message.' It specifies default behavior (temporary signed URL) and alternatives. The name and title are unambiguous, and the description distinguishes from sibling tools by referencing get_gmail_message_content as a prerequisite.

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?

The description explicitly tells the agent to first use get_gmail_message_content to list attachments, establishing a clear prerequisite. It also explains when to use each return mode (return_url, save_dir, return_content), providing context for different scenarios.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dipseth/google_workspace_fastmcp2'

If you have feedback or need assistance with the MCP directory API, please join our Discord server