Skip to main content
Glama
Gmail MCP Server

Gmail MCP Server

by Abhitkumar89

download_attachment

Saves a Gmail email attachment to disk using its message ID and attachment ID, with optional filename and save path.

Instructions

Download an email attachment to disk (requires OAuth2 config)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "messageId": "<messageId>",
      "attachmentId": "<attachmentId>"
    },
    "name": "download_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameNoFilename to save as
savePathNoOptional full path to save the file
messageIdYesGmail message ID
attachmentIdYesAttachment ID from list_attachments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, and it discloses only that OAuth2 configuration is required. It never says what disk location is used by default, whether an existing file is overwritten, whether the call returns a path or the bytes, or whether the operation is idempotent — all material for a tool that writes to disk.

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?

A single front-loaded sentence with no filler, which is appropriate for the operation. The terseness is close to under-specification, but nothing in the text is wasted.

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

Completeness2/5

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

For a 4-parameter disk-writing tool with no annotations and no output schema, the description should explain default save behavior, overwrite handling, and what is returned. None of that is present, so an agent must guess at the outcomes of a write operation.

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 description coverage is 100%, so messageId, attachmentId, filename, and savePath are already documented in the schema. The description adds no meaning beyond it — notably it does not explain how filename and savePath interact or where the file lands when savePath is omitted.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Download an email attachment') plus the destination ('to disk'), which distinguishes it from the sibling list_attachments that only enumerates attachments. It stops short of naming a sibling or defining scope boundaries, so it is clear but not fully differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to choose this over list_attachments or get_email, and no exclusions or workflow steps. The parenthetical '(requires OAuth2 config)' is the only contextual hint, and it names a prerequisite without saying how to satisfy it or what happens on failure.

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