update_message_labels
Add or remove Proton labels on an email without moving it from its folder. Labels are managed as IMAP folders under the Labels/ namespace, allowing you to organize messages efficiently.
Instructions
Add or remove Proton labels on a message without moving it. Labels are IMAP folders under the Labels/ namespace (e.g. 'Labels/Work', 'Labels/Receipts'). Adding copies the message into the label folder; removing finds and expunges it from that folder. The message stays in its source folder. Create missing labels first with create_folder using a 'Labels/' prefix.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| emailId | Yes | Composite email id in FOLDER::UID format. | |
| labelsToAdd | No | Label paths to add, e.g. ["Labels/Work", "Labels/Receipts"]. The 'Labels/' prefix is optional and will be prepended if missing. | |
| labelsToRemove | No | Label paths to remove. Idempotent — silently ignored if the label is not applied. |