gws.mail.modify_message
Modify Gmail message labels by adding or removing label IDs to archive, star, mark read/unread, or apply custom labels.
Instructions
Add or remove labels from a Gmail message (use for archiving, starring, marking read/unread, or applying custom labels)
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": {
"messageId": "<messageId>"
},
"name": "gws.mail.modify_message"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Account label or email. Uses default if omitted. | |
| messageId | Yes | The message ID | |
| addLabelIds | No | Label IDs to add (e.g., ['STARRED', 'Label_123']) | |
| removeLabelIds | No | Label IDs to remove (e.g., ['INBOX', 'UNREAD']) |