Skip to main content
Glama
isityael

Apple Mail MCP Server

by isityael

sort_inbox

Sort incoming email by sender using customizable rules. Supports dry-run preview, batch processing, and automatic folder creation.

Instructions

Sort inbox emails into folders by sender using IMAP (fast, for Proton Bridge).

Reads sorting rules from ~/.config/apple-mail-mcp/sort_rules.json. Each rule maps a sender pattern to a destination folder.

Writes real-time progress to /tmp/apple-mail-mcp-sort.log (tail -f to monitor).

Supports batch processing: set batch_size to move N emails per call. Call repeatedly until inbox is clean — already-moved emails are skipped.

Requires config: ~/.config/apple-mail-mcp/imap.json

Args: dry_run: If True, only show what would happen without moving (default: True) max_emails: Maximum emails to scan (0 = all) batch_size: Max emails to move per call (0 = all matched). Use 100-200 to avoid timeouts. rules_path: Optional custom path to sort_rules.json create_folders: Auto-create destination folders that don't exist (default: True)

Returns: Summary of emails scanned, matched, and moved

User Preferences: {"workflow": "default", "notifications": "enabled"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNo
batch_sizeNo
max_emailsNo
rules_pathNo
create_foldersNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations provided, so description carries full burden. It discloses reading config files, writing progress logs, skipping already-moved emails, auto-creating folders, and batch processing behavior. No contradictions; all behavioral traits are transparently stated.

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?

Description is well-structured with clear sections (summary, config, logging, batch, args, returns). It is front-loaded with core purpose. Some repetition (config mentioned twice), but overall efficient for the amount of detail.

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 5 optional parameters, output schema, and many sibling tools, the description is comprehensive. It explains rules file, progress log, batch calling pattern, dry run, and defaults. Output schema existence justifies brief return summary, and all essential aspects are covered.

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?

Although schema coverage is 0% (no parameter descriptions in schema), the free-text 'Args' block fully describes each parameter, including defaults and usage tips (e.g., 'Use 100-200 to avoid timeouts' for batch_size). This adds significant value beyond schema titles.

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?

Description clearly states 'Sort inbox emails into folders by sender using IMAP (fast, for Proton Bridge).' It specifies verb (sort), resource (inbox emails), and method (by sender via IMAP), distinguishing it from sibling tools like imap_bulk_move or move_email which are more generic.

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?

Description explains configuration files, batch processing, and dry-run mode, providing clear context for use. It notes 'Call repeatedly until inbox is clean' but does not explicitly exclude alternative tools or mention when not to use this tool compared to 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/isityael/apple-mail-mcp'

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