Skip to main content
Glama
sweetrb

apple-mail-mcp

by sweetrb

batch-flag-messages

Flag multiple email messages (1-100) in a single call, optionally setting a color from Apple Mail's palette. Reports counts of successful and failed flags, enabling efficient bulk email management.

Instructions

Use when: flagging multiple messages (1–100 ids) in one call, optionally with a color (red/orange/yellow/green/blue/purple/gray). Returns: counts of how many were flagged and how many failed. Do not use when: flagging just one (use flag-message) or removing flags (use batch-unflag-messages). Get the ids from search-messages or list-messages first. Pass sourceMailbox/sourceAccount (the mailbox you listed the ids from) so each numeric id is pinned to that mailbox; an id that matches in several mailboxes is refused, not guessed. Note: the color is applied on both routes — AppleScript sets the flag index, IMAP writes the equivalent $MailFlagBit0/1/2 keywords Mail.app reads — so a mixed batch of numeric and imap: ids all end up colored.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYes
colorNoOptional flag color (Apple Mail palette: red, orange, yellow, green, blue, purple, gray — 'grey' accepted). Omit for Mail's default flag. The color is applied on both routes: AppleScript sets the flag index, and IMAP writes the equivalent $MailFlagBit0/1/2 keywords Mail.app reads — so a smart mailbox keyed on flag color matches either way.
sourceAccountNoAccount the numeric ids were listed from. Required when sourceMailbox is supplied; on its own it pins nothing.
sourceMailboxNoMailbox the numeric ids were listed from (e.g. 'INBOX'). Must be paired with sourceAccount to form an unambiguous scope. Ignored for imap: ids.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNo
errorsNo
failedNo
mailboxNo
successNo
errorsTruncatedNo
Behavior5/5

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

No annotations exist, so the description carries full burden. It discloses behavior: returns success/failure counts, the dual routing (AppleScript vs IMAP) for colors, and that ambiguous ids are refused rather than guessed. These are valuable behavioral details beyond the input schema.

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

Conciseness5/5

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

Each sentence earns its place. The text is structured into clear sections (use when, returns, do not use, note) and is front-loaded with the core purpose. No fluff or redundant content.

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?

Covers the full workflow: when to use, prerequisites (get ids first), parameter-specific guidance (sourceAccount/sourceMailbox pairing), the return format, edge case (ambiguous ids), and implementation detail (color applied on both routes). With output schema present, return values are well-covered; this description complements it fully.

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?

Schema coverage is high (75%) with descriptions for color, sourceAccount, and sourceMailbox. The description adds extra meaning by explaining why sourceMailbox/sourceAccount are needed (pinning numeric ids, ambiguity refusal) and clarifying the color behavior across both routes, surpassing the schema alone.

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 states the tool flags multiple messages (1–100 ids) in one call with an optional color. It clearly distinguishes from siblings by explicitly naming flag-message for single flags and batch-unflag-messages for removing flags.

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

Usage Guidelines5/5

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

Provides explicit 'Use when' and 'Do not use when' with named alternatives. It also instructs to get ids from search-messages or list-messages first and explains how to supply sourceMailbox/sourceAccount to disambiguate ids.

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

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