Update message labels
update_message_labelsAdd or remove Proton labels on a message by name or path while keeping it in its source folder; adding a missing label fails until it is created.
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. Name labels in labelsToAdd / labelsToRemove by name or path, any case (e.g. ["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.
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": {
"uid": "<uid>"
},
"name": "update_message_labels"
}
}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 | Labels to add, by name or path (e.g. ["Important"] or ["Labels/Important"]); any case. | |
| labelsToRemove | No | Labels to remove, by name or path (e.g. ["Important"] or ["Labels/Important"]). |