Skip to main content
Glama
nityeshaga

google-workspace-mcp-server

by nityeshaga

Get Gmail Attachment

gmail_get_attachment
Read-onlyIdempotent

Download a Gmail attachment using message and attachment IDs. Retrieve image content directly or obtain download information for other file types.

Instructions

Download an attachment from a Gmail message.

Args:

  • message_id (string): The ID of the message containing the attachment

  • attachment_id (string): The ID of the attachment to download (from gmail_list_attachments)

  • filename (string, optional): Filename for the attachment (for display purposes)

Returns: The attachment content. For images, returns the image directly. For other files, provides download info.

Examples:

  • Download attachment: message_id="abc123", attachment_id="xyz789"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameNoOptional filename for the attachment (used for saving)
message_idYesThe ID of the message containing the attachment
attachment_idYesThe ID of the attachment to download
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds valuable behavioral detail about return types: images are returned directly, while other files provide download info. This goes beyond the annotations and helps the agent anticipate the response format.

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 well-structured with Args, Returns, and Examples sections. It front-loads the primary purpose and avoids extraneous prose. The example is minimal but helpful. Minor redundancy exists (filename repeated), but overall it is concise and scannable.

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

Completeness3/5

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

The tool has no output schema, so the return behavior description is essential and provided (images vs. other files). However, it lacks details on error cases, MIME type handling, or what exactly 'download info' contains. The conflicting filename definition also leaves ambiguity. Given the simple nature of the tool, it's adequate but not complete.

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 baseline is 3. The description adds a useful note that attachment_id comes from gmail_list_attachments, and provides an example. However, it contradicts the schema for 'filename': description says 'for display purposes' while schema says 'used for saving'. This inconsistency reduces trust and clarity.

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 opens with 'Download an attachment from a Gmail message', which is a specific verb (download) plus resource (Gmail attachment). It clearly differentiates from siblings like gmail_list_attachments (lists attachments) and gmail_get_message (gets message content). The Args list further reinforces the exact inputs needed.

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 implies the workflow by noting attachment_id comes from gmail_list_attachments, which is a useful cross-tool hint. It doesn't explicitly state when not to use this tool or compare alternatives, but the context is clear enough for an agent to know this is the step after listing attachments.

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/nityeshaga/google-workspace-mcp-server'

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