Skip to main content
Glama

export_emails

Export emails from Apple Mail to files for backup or analysis, supporting single emails by keyword or entire mailboxes with format options.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountYes
scopeYes
subject_keywordNo
mailboxNoINBOX
save_directoryNo~/Desktop
formatNotxt
max_emailsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. Discloses the safety cap (max_emails default), return value format (confirmation with location), and filesystem interaction. Missing critical behavioral details for a file-writing tool: overwrite behavior, disk space requirements, and idempotency guarantees.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Uses standard Google-style docstring format (Args/Returns) which is scannable and front-loaded. Purpose statement is immediate. Minor verbosity in headers is acceptable for clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Handles 7-parameter complexity well, particularly the conditional logic between scope types. Acknowledges output schema existence with brief return description. Could improve by noting error conditions (e.g., invalid directory) or file format specifics beyond extension names.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Excellent compensation for 0% schema description coverage. Documents all 7 parameters with examples (account), enum values (scope, format), defaults (mailbox, format, max_emails), and conditional requirements (subject_keyword dependency on scope).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States clear action (export emails to files) and use case (backup/analysis). Distinguishes implicitly from siblings like 'search_emails' by emphasizing file export, though explicit contrast with 'save_email_attachment' is absent.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides use cases (backup/analysis) and explains the conditional dependency between 'scope' and 'subject_keyword'. However, lacks explicit guidance on when to choose this over 'search_emails' or 'save_email_attachment', and omits prerequisites like directory permissions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/patrickfreyer/apple-mail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server