Flag Email
flag_emailFlags an email in the Mac's Apple Mail (Mail.app) with a color, or clears its flag. color is one of red, orange, yellow, green, blue, purple, gray, or none to clear (default red). The answer is what Mail reads back after the change. Pass account= and mailbox= (from list_emails/search_emails) so the message is found without scanning.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"message_id": "<message_id>"
},
"name": "flag_email"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | No | red, orange, yellow, green, blue, purple, gray, or none to clear the flag. Default red. | |
| account | No | Mail.app account the message lives in (returned alongside the id). Pass it so the message is found in the right account. | |
| confirm | No | Ignored; kept for older clients. | false |
| mailbox | No | Folder the message is in. Passing it skips searching the other folders. | |
| message_id | Yes | The message id returned by list_emails or search_emails. Accepts the bare id or the <angle-bracketed> form. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | No | null when the flag was cleared. | |
| flagged | No | ||
| warning | No | ||
| flag_index | No | Mail's flag index, 0-6; -1 when not flagged. | |
| message_id | No |