Skip to main content
Glama
MarcinWalendowski

AnyMail MCP

Get attachment

get_attachment
Read-only

Download an email attachment by its index. Provide a save path to write to disk, or receive the attachment as base64.

Instructions

Download one attachment from a message by index. Provide savePath to write it to disk (required for files >5MB); otherwise returns base64.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYesAttachment index from get_message.attachments.
accountNoGmail address to act on. Omit to use the default account.
gmMsgIdYesGmail message id (X-GM-MSGID), as returned by search_messages or get_message.
savePathNoAbsolute path to write the attachment to.
Behavior5/5

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

The description explains the two output modes and the size threshold, adding behavioral context beyond the readOnlyHint annotation. No contradiction with annotations; the tool is read-only and the description aligns.

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?

Two sentences with no wasted words. The main action and key conditions are front-loaded. Every sentence adds value.

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?

The description covers the core behavior (download modes, size threshold) and uses the schema well. However, it is slightly ambiguous whether savePath is always required for writing or only for large files. Overall, it is adequate given the tool's simplicity and rich schema.

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

Parameters4/5

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

The schema already covers all parameters with descriptions (100% coverage). The tool description adds useful context: savePath is required for files >5MB, which is not in the schema. This enhances parameter understanding.

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 'Download one attachment from a message by index.' It specifies the verb (download), resource (attachment), and the two modes (base64 or file write) with a size threshold, distinguishing it from siblings like get_message.

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 gives clear context on when to use savePath (required for files >5MB) and otherwise returns base64. It does not explicitly compare with alternatives among siblings, but provides enough guidance for correct invocation.

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/MarcinWalendowski/anymail-mcp'

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