Skip to main content
Glama

Export Emails

export_emails

Export Apple Mail emails to TXT or HTML files for backup or analysis. Choose a single message by keyword or an entire mailbox, then save results to a directory.

Instructions

Export emails to files for backup or analysis.

Input Schema

NameRequiredDescriptionDefault
scopeYesExport scope: "single_email" (requires subject_keyword) or "entire_mailbox"
formatNoExport format: "txt", "html" (default: "txt")txt
accountYesAccount name (e.g., "Gmail", "Work")
mailboxNoMailbox to export from (default: "INBOX")INBOX
max_emailsNoMaximum number of emails to export for entire_mailbox (default: 1000, safety cap)
save_directoryNoDirectory to save exports (default: "~/Desktop"). Protected locations (dot-folders in ~, LaunchAgents, ~/Library/Application Support, ...) are rejected.~/Desktop
subject_keywordNoKeyword to find email (required for single_email)

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed19 schema fields changedv3.2.1
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / account / description
      Added value: +"Account name (e.g., \"Gmail\", \"Work\")"
    • removedInput schema / properties / account / title
      Removed value: -"Account"
    • addedInput schema / properties / format / description
      Added value: +"Export format: \"txt\", \"html\" (default: \"txt\")"
    • removedInput schema / properties / format / title
      Removed value: -"Format"
    • addedInput schema / properties / mailbox / description
      Added value: +"Mailbox to export from (default: \"INBOX\")"
    • removedInput schema / properties / mailbox / title
      Removed value: -"Mailbox"
    • addedInput schema / properties / max_emails / description
      Added value: +"Maximum number of emails to export for entire_mailbox (default: 1000, safety cap)"
    • removedInput schema / properties / max_emails / title
      Removed value: -"Max Emails"
    • addedInput schema / properties / save_directory / description
      Added value: +"Directory to save exports (default: \"~/Desktop\"). Protected\nlocations (dot-folders in ~, LaunchAgents, ~/Library/Application Support,\n...) are rejected."
    • removedInput schema / properties / save_directory / title
      Removed value: -"Save Directory"
    • addedInput schema / properties / scope / description
      Added value: +"Export scope: \"single_email\" (requires subject_keyword) or \"entire_mailbox\""
    • removedInput schema / properties / scope / title
      Removed value: -"Scope"
    • addedInput schema / properties / subject_keyword / description
      Added value: +"Keyword to find email (required for single_email)"
    • removedInput schema / properties / subject_keyword / title
      Removed value: -"Subject Keyword"
    • removedInput schema / title
      Removed value: -"export_emailsArguments"
    • removedOutput schema / properties / result / title
      Removed value: -"Result"
    • removedOutput schema / title
      Removed value: -"export_emailsOutput"
    • addedOutput schema / x-fastmcp-wrap-result
      Added value: +true
  2. First observedv3.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses only that files are produced; it omits that writes touch the local filesystem, that some save locations are rejected, what happens on large mailboxes, and whether existing files are overwritten. These are all material for an agent about to invoke a filesystem-writing tool.

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?

A single front-loaded sentence with zero filler, which is structurally sound. It is arguably undersized for a 7-parameter tool, which keeps it from a 5.

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

Completeness2/5

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

With no annotations and a tool that writes to disk, the description leaves out the safety and side-effect profile entirely. The output schema removes the need to explain return values, but the gap in behavioral context is significant for this complexity.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter (scope, format, account, mailbox, max_emails, save_directory, subject_keyword) is already documented in the schema, including the scope/subject_keyword dependency and the protected-path rejection. The description adds nothing beyond that, so the baseline 3 applies.

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 a specific verb (export) and resource (emails) plus the destination (files), which is enough to distinguish it from every read/search/compose sibling. It is clear, but adds no differentiation language because no sibling overlaps its function.

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

Usage Guidelines2/5

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

"for backup or analysis" hints at intent but gives no when-to-use criteria, no prerequisites, and no alternatives (e.g., search_emails for targeted retrieval vs. this bulk export). An agent gets no routing guidance.

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