Skip to main content
Glama
chandshy
by chandshy

Download Attachment

download_attachment
Read-only

Retrieve an email attachment's binary content as a base64-encoded string. Use get_email_by_id to find the attachment's index first.

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
account_idNoOptional account ID to route this call to (multi-account configs). Omit to use the active account. Configured account IDs are listed in the settings UI (Accounts tab).
attachment_indexYes0-based index of the attachment (from get_email_by_id attachments array)

Output Schema

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

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

Annotations already indicate read-only and open-world hints. Description adds value by specifying the output is base64-encoded, which is not in annotations. No contradictions.

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 that front-load the action and result. 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?

For a tool with 3 parameters and no nested objects, the description adequately covers purpose, prerequisite, and output format. Could mention that the output is the base64 string but not its structure.

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 covers 100% of parameters with descriptions. Description adds context about using indices from get_email_by_id, complementing the 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 downloads binary content of an email attachment as base64-encoded string. It distinguishes itself from siblings by specifying the action and output format.

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?

Explicitly instructs to use get_email_by_id first to see available attachments and indices. Provides clear usage context but does not mention alternative methods for downloading 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/chandshy/mailpouch'

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