Skip to main content
Glama
SinoEdwards

Mail Agent MCP

by SinoEdwards

imap_download_attachment

Download a specific email attachment by UID and filename. Images appear inline; PDFs and other files save to the configured directory.

Instructions

Download a single attachment from an email (folder + uid + attachment filename/contentId, as listed by imap_get_email). Images are returned inline for viewing; PDFs and other files are saved only inside the configured download directory. Use when the user wants the actual file contents, not just the message body.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYesEmail UID
folderNoFolder nameINBOX
filenameYesAttachment filename or contentId
savePathNoOptional root-relative path, or absolute path already inside the configured download directory. Outside paths are rejected.
accountIdNoAccount ID (from imap_list_accounts). Optional if accountName is given or only one account is configured.
accountNameNoAccount name instead of accountId. Optional if accountId is given or only one account is configured.
extractTextNoFor PDFs, extract and return text content inline
Install Server

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden of disclosing behavior. It explains that images are returned inline, while PDFs and other files are saved only inside the configured download directory, and that savePath outside the directory is rejected. This is meaningful behavioral context beyond the raw schema, though it does not cover every edge case such as failure modes or MIME-type handling.

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 three sentences with no filler. The primary behavior and identifier requirements appear first, followed by relevant file-handling details and a concise usage cue. 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?

For a tool with seven parameters, no output schema, and no annotations, the description covers the essential context: what is downloaded, how it is identified, what happens to different file types, and when to use it. It could be slightly more explicit about return values for PDFs given the extractText parameter, but it is largely complete for an agent to invoke it correctly.

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 the schema already documents all seven parameters. The description adds minimal new meaning beyond referencing folder + uid + attachment filename/contentId as the lookup key and implying the save destination behavior. This is adequate but does not substantially expand on the schema's parameter documentation.

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 identifies a specific action (Download), a specific resource (a single attachment from an email), and the identifying fields (folder + uid + attachment filename/contentId). It also references imap_get_email as the source of those identifiers and explicitly distinguishes itself from retrieving just the message body, which separates it clearly from sibling tools like imap_get_email.

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 a direct condition: 'Use when the user wants the actual file contents, not just the message body.' This tells an agent when to select this tool, though it does not name alternative tools explicitly or state when not to use it beyond the message-body contrast. It still provides clear practical guidance.

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

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/SinoEdwards/mail-agent-mcp'

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