update_mail_status
Mark Mail messages as read or unread and flag or unflag them, optionally with a colour, by passing message IDs; dry-run previews changes.
Instructions
Mark Mail messages read/unread and flag/unflag them, optionally with a colour.
ids are RFC822 message-ids from a mail read, comma-separated; max 25 per call.
mailbox is OPTIONAL and is the disambiguator: pass the folder value from the
SAME read back VERBATIM (an opaque imap://<uuid>/<path> token) and the whole batch
is addressed directly; omit it and each id is resolved through Mail's index (Full
Disk Access), which also lets one call span several mailboxes.
At least one of read, flagged or flag_color is required. flag_color is a
name — red/orange/yellow/green/blue/purple/grey — and setting one implies flagged.
dry_run defaults to FALSE: this changes two booleans, destroys nothing, and
re-issuing it with the opposite value is the undo — so it does not use the backup
plane that move_mail does. Each message is re-read after the write, so the per-id
results report what actually persisted. Destructive (it modifies stored messages);
needs Automation access for Mail.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | ||
| read | No | ||
| dry_run | No | ||
| flagged | No | ||
| mailbox | No | ||
| flag_color | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||