Skip to main content
Glama
sweetrb

apple-mail-mcp

by sweetrb

flag-message

Flags a single email message by its ID, optionally applying a color from Apple's palette. Returns confirmation that the flag was set.

Instructions

Use when: flagging a single message (by id), optionally with a color (red/orange/yellow/green/blue/purple/gray). Returns: a confirmation that the message was flagged (and the color, when applied). Do not use when: flagging several at once (use batch-flag-messages) or removing a flag (use unflag-message). Get the id from search-messages or list-messages first. Note: the color is applied on both routes — AppleScript sets the flag index, IMAP writes the equivalent $MailFlagBit0/1/2 keywords Mail.app reads.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
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.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo
okNo
colorNo
colorAppliedNo
Behavior4/5

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

With no annotations, the description carries the burden of behavioral disclosure. It discloses that the operation returns a confirmation, explains the dual route (AppleScript flag index vs IMAP $MailFlagBit keywords), and notes color behavior on both routes. This exceeds a generic mutation statement, though it does not address auth or error conditions.

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?

Four focused segments (Use when, Returns, Do not use when, Note) with no filler; every sentence provides actionable information. The structure makes it easy to scan and quickly extract key facts.

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 2-parameter operation, the description covers purpose, usage boundaries, return value, and a subtle implementation detail. The presence of an output schema further reduces the need to describe return structure, making this complete for the tool's complexity.

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 description adds meaning to the 'id' parameter by directing the user to search-messages/list-messages to obtain it. The color parameter is fully described in the schema with an enum and detailed explanation of its effect. Schema coverage is 50%, so the description partially compensates for the undocumented 'id' property.

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 explicitly states 'flagging a single message (by id), optionally with a color', which is a specific verb+resource and immediately distinguishes from batch flagging (batch-flag-messages) and unflagging (unflag-message). The color options are enumerated, leaving no ambiguity about the tool's scope.

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?

Offers explicit use-when and do-not-use-when guidance, naming batch-flag-messages and unflag-message as alternatives. It also instructs the user to obtain the id from search-messages or list-messages first, providing a clear workflow context.

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