email_save_attachment
Save an email attachment directly to a downloads directory and return file metadata only, avoiding token costs from passing large attachments through the model.
Instructions
Download an email attachment and save it directly to disk, returning metadata only (no base64 in the response) — avoids paying the token cost of round-tripping large attachments through the calling model. outputPath is relative to a fixed downloads directory (/root/.email-mcp/downloads, override with EMAIL_MCP_DOWNLOADS_DIR) and cannot escape it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"accountId": "<accountId>",
"emailId": "<emailId>",
"attachmentId": "<attachmentId>",
"outputPath": "<outputPath>"
},
"name": "email_save_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| emailId | Yes | ||
| accountId | Yes | ||
| outputPath | Yes | Relative file path (within the downloads directory) to save the attachment as | |
| attachmentId | Yes | ||
| sourceFolder | No | Source folder (required for IMAP/iCloud when email is not in INBOX) |