MCPTools Reference
mail.update_labels
Add or remove labels on a message
Scope: mail:manage
Update labels on a message. Use this to mark emails as read, flag them, or track processing state.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
messageId | string | Yes | Message to update |
addLabels | string[] | No | Labels to add |
removeLabels | string[] | No | Labels to remove |
Example
Agent finished processing an email.
→ mail.update_labels({
messageId: "<abc123@gmail.com>",
addLabels: ["read", "processed"],
removeLabels: ["unread"]
})Common Patterns
| Action | addLabels | removeLabels |
|---|---|---|
| Mark read | ["read"] | ["unread"] |
| Flag important | ["important"] | — |
| Mark processed | ["processed"] | ["unread"] |
| Archive | ["archived"] | — |
REST Equivalent
PATCH /v0/messages/{messageId}