Skip to main content
Glama
VMail MCP

VMail MCP

by ongtungduong

imap_download_attachment

Download a single email attachment by folder, UID, and filename; view images inline, extract PDF text, or save files locally when you need the actual contents.

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

NameRequiredDescriptionDefault
uidYesEmail UID
folderNoFolder nameINBOX
filenameYesAttachment filename or contentId as listed by imap_get_email. Matched exactly first, then Unicode-normalized (NFC/NFD spellings of umlauts and accents are treated as equal); a contentId may be given with or without its angle brackets
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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses type-dependent side effects (images returned inline, PDFs saved plus text extracted, other files written to the shared downloads directory or savePath). Gaps remain around failure conditions (missing attachment), size limits, and permissions, which an undocumented mutation-style tool would ideally state.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

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

Three sentences, front-loaded with the action and addressing scheme, then the per-type behavior, then the usage cue. The middle sentence is dense but every clause carries information; no filler sentences.

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?

No output schema or annotations exist, so the description must carry the behavior, and it does explain the differing return shapes by file type plus the disk-write side effect. It is nearly complete for this tool, with only error/permission behavior left unspecified.

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 baseline is 3. The description maps some behavior to parameters (filename/contentId, savePath, extractText), but largely restates what the schema properties already document, adding no format or edge-case guidance beyond it.

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?

States a specific verb+resource combination ('Download a single attachment from an email') with the addressing triple (folder + uid + attachment filename/contentId) and the reference tool for discovery (imap_get_email). An agent can distinguish this from imap_get_email, which returns the body, without opening the schema.

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?

Gives an explicit when-to-use condition: 'Use when the user wants the actual file contents, not just the message body.' This routes the agent away from the body-reading sibling, though the alternative is not named as a fallback tool for the opposite case.

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