export_emails
Export emails from Apple Mail accounts to files on disk for backup or analysis. Supports single email or entire mailbox export in TXT or HTML format.
Instructions
Export emails to files for backup or analysis.
Args: account: Account name (e.g., "Gmail", "Work") scope: Export scope: "single_email" (requires subject_keyword) or "entire_mailbox" subject_keyword: Keyword to find email (required for single_email) mailbox: Mailbox to export from (default: "INBOX") save_directory: Directory to save exports (default: "~/Desktop") format: Export format: "txt", "html" (default: "txt") max_emails: Maximum number of emails to export for entire_mailbox (default: 1000, safety cap)
Returns: Confirmation message with export location
User Preferences: {"workflow": "default", "notifications": "enabled"}
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": {
"account": "<account>",
"scope": "<scope>"
},
"name": "export_emails"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | Yes | ||
| format | No | txt | |
| account | Yes | ||
| mailbox | No | INBOX | |
| max_emails | No | ||
| save_directory | No | ~/Desktop | |
| subject_keyword | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |