Skip to main content
Glama

get_gmail_attachment_content

Download a Gmail attachment to disk or get a temporary download URL. Requires the parent message ID and attachment ID from the message payload.

Instructions

Download a Gmail attachment to disk (or expose via download URL).

Side effects: writes a file to the configured attachment storage (stdio mode) or publishes a temporary download URL valid for 1 hour (HTTP mode). In stateless mode, no file is written and a base64 preview is returned instead. Attachment IDs are ephemeral — always re-fetch the parent message (get_gmail_message_content) just before calling this. Requires the gmail.readonly OAuth scope.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
message_idYesGmail message ID that owns the attachment.
attachment_idYesAttachment ID from the parent message's payload parts — get this by calling get_gmail_message_content and reading the attachment metadata section.
user_google_emailYesThe user's Google email address (authenticated account).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations are provided, so the description fully carries the burden. It discloses side effects (writing file, temporary URL), stateless mode behavior (base64 preview), and ephemeral nature of attachment IDs. This is comprehensive for the tool's safety profile.

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?

The description is concise and well-structured, with a main sentence followed by bullet-point-like details. Each sentence adds value, though it could be slightly more compact. No wasted words.

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?

Given the tool's complexity (file download, multiple modes), the description covers key aspects: download vs URL, stateless mode, ephemeral IDs, and OAuth scope. Output schema exists, so return values are handled. Minor omissions like file size limits are acceptable.

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%, so the schema already describes all three parameters. The description adds context about attachment_id needed from parent message, but this is also in the schema. Minimal extra value beyond schema.

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 Gmail attachment'. It specifies the verb (download) and resource (Gmail attachment), and distinguishes it from siblings like get_gmail_message_content by focusing on attachment content rather than the message body.

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?

The description provides clear guidance: to download an attachment, and notes that attachment IDs are ephemeral, advising to re-fetch the parent message before calling. It also mentions required OAuth scope. However, it does not explicitly state when not to use this tool or name alternatives.

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/HuntsDesk/ve-gws'

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