Skip to main content
Glama
nikolausm

IMAP MCP Server

by nikolausm

imap_download_attachment

Download attachments from emails by specifying folder, UID, and filename. Images display inline, PDF text extracts automatically, other files save to downloads 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 are saved and their text is extracted inline (extractText); other files are saved to the shared downloads directory (or savePath). 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 file path to save the attachment to. If not provided, files are saved to the shared downloads directory.
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
Behavior5/5

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

With no annotations, the description fully carries the behavioral burden. It explains behavior per file type: images returned inline, PDFs saved with optional text extraction, other files saved to downloads or custom savePath. No destructive actions are mentioned, and it appears consistent with a read operation.

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?

Three sentences, each essential and front-loaded. The first sentence defines the tool, the second explains behavior, the third gives usage guidance. No wasted words, and structure is logical.

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 7 parameters, no output schema, and no annotations, the description covers key behavioral aspects and usage. It references related tool for listing. Missing error handling details, but overall it's sufficient for an agent to select and invoke the tool correctly.

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 100%, so baseline is 3. The description adds value by explaining how file type affects behavior (e.g., 'extractText' for PDFs) and connects to imap_get_email for listing. This goes beyond the schema's parameter descriptions.

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 single attachment, specifying the required inputs (folder, uid, filename/contentId). It distinguishes between different file types and contrasts with just getting the message body, making the purpose unambiguous.

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 explicitly says 'Use when the user wants the actual file contents, not just the message body,' providing clear usage context. It also references imap_get_email for listing attachments. While it doesn't list explicit when-not-to-use scenarios or alternatives beyond the implied contrast, the guidance is sufficient.

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/nikolausm/imap-mcp-server'

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