update_message_labels
Add or remove Proton labels on a message by specifying full label paths, without moving the message from its source folder.
Instructions
Add or remove Proton labels on a message. Labels live under the "Labels/" namespace and are additive — the message stays in its source folder while gaining or losing label tags. Pass full paths in labelsToAdd / labelsToRemove (e.g. ["Labels/Important", "Labels/Work"]).
Adds are strict: copying to a missing label throws "Label not found" (create it first with create_label). Removes are idempotent: removing a label that doesn't apply, or doesn't exist as a mailbox, is a silent no-op.
UID + folder pair caveat: IMAP UIDs are per-folder. Pair the UID with the folder it came from; the same UID can refer to different messages elsewhere.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | Message UID in the source folder | |
| folder | No | Source folder containing the message (default: INBOX) | INBOX |
| labelsToAdd | No | Full label paths to add (e.g. ["Labels/Important"]) | |
| labelsToRemove | No | Full label paths to remove (e.g. ["Labels/Important"]) |