Skip to main content
Glama
androidua

Apple Mail MCP Server

by androidua

mail_list_mailboxes

Read-onlyIdempotent

List all mailboxes and folders in Apple Mail, grouped by account. Returns results in markdown or JSON format with optional message counts.

Instructions

List all mailboxes/folders available in Apple Mail, grouped by account.

Queries Apple Mail via AppleScript to retrieve every configured account and all mailboxes within each account (INBOX, Sent Messages, Drafts, custom folders, etc.). Strictly read-only — no emails are modified and no network calls are made.

Args: params (ListMailboxesInput): Input containing: - response_format (str): 'markdown' (default) or 'json'. - include_counts (bool): Add per-mailbox message counts to help choose search scope. Slower on many-mailbox setups. Default false.

Returns: str: Formatted list of all accounts and their mailboxes.

Markdown example:
    # Apple Mail Mailboxes

    ## iCloud
    - INBOX
    - Sent Messages
    - Drafts

JSON example:
    [
      {"account": "iCloud", "mailbox": "INBOX"},
      {"account": "iCloud", "mailbox": "Sent Messages"}
    ]

Examples: - Use when: "What mailboxes do I have?" → default params - Use when: "List my email folders as JSON" → response_format="json"

Error Handling: Returns an error string if Mail.app cannot be reached or there are no configured accounts. Prompts the user to open Mail.app if needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations already declare readOnlyHint and destructiveHint, but the description strongly reinforces 'Strictly read-only — no emails are modified and no network calls are made.' It also details error handling (Mail.app unreachable, no accounts), exceeding the annotations' context.

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 well-organized with summary, parameters, return format, examples, and error handling. It could be slightly shorter but every section adds unique value; no redundant information.

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

Completeness5/5

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

Given the simple listing nature, annotations, and output schema, the description completely covers purpose, behavior, parameters, return format with both Markdown and JSON examples, and error handling. Additional context (AppleScript, performance hints) makes it fully actionable.

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?

Despite 0% schema coverage, the description provides full parameter details: 'include_counts' includes performance trade-off advice ('10k-message mailbox scans in ~10-20s'), and 'response_format' explains default vs. JSON. This adds significant meaning beyond the schema's own descriptions.

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 that the tool lists all mailboxes/folders in Apple Mail, grouped by account. It uses specific verbs ('list') and resource ('mailboxes/folders'), and the distinction from sibling tools is clear since siblings handle reading and searching specific emails.

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

Usage Guidelines4/5

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

Examples show when to use the tool ('What mailboxes do I have?') and when to switch format. However, no explicit when-not-to-use or direct comparison to alternatives is given, though it's implied by the distinct purposes of siblings.

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/androidua/apple-mail-mcp'

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