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
| Name | Required | Description | Default |
|---|---|---|---|
| message_id | Yes | ||
| filename | No | ||
| index | No | ||
| dest_dir | No | ||
| account | No | ||
| folders | No | ||
| overwrite | No | ||
| download_all | No | ||
| return_base64 | No | ||
| uid | No | ||
| folder | No |