Skip to main content
Glama

export_emails

Export emails from Apple Mail accounts to local files for backup or analysis. Choose between exporting a single email by subject or an entire mailbox with format and quantity limits.

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?

With no annotations, the description carries the full burden. It discloses the safety cap on max_emails (1000) and default values, but does not mention potential performance implications, access permissions needed, or what happens if the export fails. The information is adequate but not comprehensive.

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?

The description is structured as a docstring with clear sections (Args, Returns). It is reasonably concise, though the list of parameters could be condensed. The front-loaded purpose sentence is effective.

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?

The description covers all 7 parameters with explanations, default values, and return info. Given that there is an output schema (even though not detailed in the description), the description is fairly complete for the tool's complexity. Minor gaps like error cases or batch processing details are acceptable.

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

Parameters4/5

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

The input schema has 0% coverage, so the description is essential. It explains each parameter, including the conditional requirement of subject_keyword for 'single_email' scope, defaults for mailbox, save_directory, etc. This adds significant meaning beyond the raw schema fields.

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

Purpose5/5

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

The description clearly states the verb 'export' and the resource 'emails to files', and specifies the purposes 'backup or analysis'. This distinguishes it from sibling tools like compose_email or search_emails, which have different purposes.

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?

The description describes the parameters and their roles, and implies use cases like backup/analysis, but does not explicitly state when to use this tool versus alternatives (e.g., for individual email export vs. mailbox export). No 'when not to use' guidance is provided.

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