download_attachment
Download an email attachment to your device by specifying account, email ID, and attachment name. Optionally set a save path; feature must be enabled in server settings.
Instructions
Download an email attachment. By default it is saved with a safe randomized name under the current user's Downloads/mcp-email-server directory; an explicit destination path remains supported. This feature must be explicitly enabled in settings (enable_attachment_download=true) due to security considerations.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mailbox | No | The mailbox to search in (default: INBOX). | INBOX |
| email_id | Yes | The email ID (obtained from list_emails_metadata or get_emails_content). | |
| save_path | No | Optional exact destination path. Omit it to use a safe randomized filename under the current user's Downloads/mcp-email-server directory. Relative explicit paths are resolved against the server process working directory. | |
| account_name | Yes | The name of the email account. | |
| attachment_name | Yes | The name of the attachment to download (as shown in the attachments list). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | Yes | ||
| email_id | Yes | ||
| mime_type | Yes | ||
| saved_path | Yes | ||
| attachment_name | Yes |