update_message_flags
Add or remove custom IMAP flags on a single email, then verify server application. Returns flags not applied for precise control.
Instructions
Add or remove arbitrary IMAP flags on a single message, then verify the server applied them. Prefer bulk_update_flags to update flags across multiple messages at once. Returns notApplied[] listing flags the server silently dropped. Use for custom IMAP flags (e.g. \Answered) or when mark_email_read / star_email don't cover the flag you need. \Seen/\Flagged/\Deleted are gated the same as mark_email_read/star_email/delete_email: each requires the matching action in PROTONMAIL_ALLOWED_ACTIONS, and setting \Deleted also requires confirmed:true when PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled.
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": {
"emailId": "<emailId>"
},
"name": "update_message_flags"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| emailId | Yes | Composite email id in FOLDER::UID format. | |
| confirmed | No | Pass true to confirm setting \\Deleted. Required when PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled. | |
| flagsToAdd | No | IMAP flags to set, e.g. ["\\Seen", "\\Flagged", "\\Answered"]. | |
| flagsToRemove | No | IMAP flags to clear. |