download_attachment
Download a single email attachment by specifying message and attachment IDs. Supports direct image viewing or saving to a local file path.
Instructions
Download a single attachment.
Args: save_path: Write the bytes to this file path (or into this existing directory, using the attachment's name) instead of returning content. Returns {"path", "name", "content_type", "size_bytes"}.
Returns: - Image attachments (PNG/JPEG/GIF/WebP, no save_path): metadata plus the image itself as a native MCP image block, viewable directly. - With save_path: {"path", "name", "content_type", "size_bytes"}. - Otherwise: {name, content_type, size_bytes, content_base64}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mailbox | No | ||
| save_path | No | ||
| message_id | Yes | ||
| include_raw | No | ||
| attachment_id | Yes |