download_attachment
Download an email attachment by ID, receiving either a direct download URL or a saved file path with size.
Instructions
Download an email attachment. If savePath is provided, saves the file to disk and returns the file path and size. Otherwise returns a download URL.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| emailId | Yes | ID of the email | |
| savePath | No | File path to save the attachment to. May be absolute or relative; relative paths resolve against ~/Downloads/fastmail-mcp/ (configurable via FASTMAIL_DOWNLOAD_DIR), so a bare filename lands there in one step. Absolute paths must fall within that directory; traversal or symlink escape outside it is rejected for security. To save directly into your own location, set FASTMAIL_DOWNLOAD_DIR to that root. Parent directories will be created automatically. | |
| attachmentId | Yes | ID of the attachment |