Skip to main content
Glama
chandshy
by chandshy

Download Attachment

download_attachment
Read-only

Retrieve the binary content of an email attachment as a base64-encoded string. Use after getting email details to identify the attachment index.

Instructions

Download the binary content of an email attachment as a base64-encoded string. Use get_email_by_id first to see available attachments and their indices (0-based).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
email_idYesIMAP UID of the email
attachment_indexYes0-based index of the attachment (from get_email_by_id attachments array)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYes
contentTypeYes
sizeYes
contentYesBase64-encoded attachment content
encodingYes
Behavior4/5

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

Annotations include readOnlyHint: true and openWorldHint: true. The description adds the key behavioral detail that the output is base64-encoded binary, which is not covered by annotations. This helps the agent understand 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences: first sentence defines core functionality, second sentence provides critical usage guidance. No unnecessary words, perfectly front-loaded.

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 simplicity, the description covers main purpose, output format, and parameter source. It references the prerequisite tool and mentions the output schema (base64). Could include more error handling context, but the output schema likely fills any gaps.

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?

Schema already describes both parameters with 100% coverage (IMAP UID and 0-based index). The description adds value by linking attachment_index to 'get_email_by_id attachments array', providing context that clarifies how to obtain the correct index.

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 action ('Download'), the resource ('email attachment'), and the output format ('base64-encoded string'). It distinguishes itself from sibling tools by specifying a unique operation not shared by any sibling.

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 explicit guidance to 'Use get_email_by_id first to see available attachments and their indices (0-based).' This tells the agent the prerequisite step and how to obtain the necessary parameters, effectively differentiating when this tool should be used.

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/chandshy/mailpouch'

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