Skip to main content
Glama
swapnilsurdi

email-mcp

by swapnilsurdi

download_attachment

Download email attachments without marking messages read. Choose by filename, index, or download all attachments to local disk or as base64.

Instructions

Download a message's attachment(s) — read-only, never marks mail read. Select one by filename or index (from get_emails' attachments list); a lone attachment needs neither; download_all=true saves every attachment. Saved into the server download dir (override env EMAIL_MCP_DOWNLOAD_DIR) unless dest_dir is given; the email-supplied filename is sanitized and confined to that directory. return_base64=true returns the bytes inline (small files only, ≤256KB) instead of writing to disk. uid+folder (from get_emails) locate the message directly — use them when a message has no/duplicate Message-ID. Returns {saved_path|content_base64, filename, mime_type, size, ...}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
message_idYes
filenameNo
indexNo
dest_dirNo
accountNo
foldersNo
overwriteNo
download_allNo
return_base64No
uidNo
folderNo
Behavior5/5

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

With no annotations, the description fully bears the burden. It discloses read-only behavior, download methods, base64 limit, file sanitization, and output format, providing comprehensive behavioral context.

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?

The description is concise yet thorough, front-loading the main purpose and using efficient language. Every sentence adds value without being verbose.

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 no output schema, the description explains return values well and covers edge cases (uid/folder) and limitations (base64 size). Missing details on a few schema parameters reduce completeness slightly.

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 coverage is 0%, so description must explain parameters. It covers most key parameters (filename, index, dest_dir, download_all, return_base64, uid, folder) but omits 'account', 'folders', and 'overwrite', leaving some gaps.

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 a message's attachment(s) and declares it as read-only. It distinguishes itself from sibling tools like get_emails and send_email by specifying its function.

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 clear guidance on how to select attachments (by filename, index, or lone attachment) and when to use uid/folder. It lacks explicit when-not-to-use instructions but covers key usage scenarios.

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/swapnilsurdi/email_mcp'

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