Update labels on messages
cooper_update_messagesUse this when several stored messages should gain or lose the same labels, including marking a batch read. Requires auth. Works on a paused inbox, because this is triage and not a send. Inputs: inbox_id (required; inbox id, username, or email), message_ids (required; 1 to 50 unique message ids), add_labels (optional strings), remove_labels (optional strings). At least one of add_labels or remove_labels is required. Mark read with remove_labels ["unread"]. You may also add "read". read and unread can be changed. Other system labels (inbox, sent, untrusted, auth_failed, owner, and SPF/DKIM/DMARC results) cannot be added or removed. Ids that are not in this inbox are left out. The messages that are in this inbox all update, or none do. Returns {object:"list", limit, count, data} with full messages in the same order as message_ids. While a message is held, the body stays withheld and the held label is not removed. Empty message_ids is 400 missing_message_ids. Duplicates are 400 duplicate_message_ids. More than 50 ids is 400 too_many_ids. Missing labels is 400 missing_labels. Invalid labels return invalid_label, protected_label, or label_conflict. Another inbox is 404 inbox_not_found.
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": {
"inbox_id": "<inbox_id>",
"message_ids": "<message_ids>"
},
"name": "cooper_update_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inbox_id | Yes | Inbox id (inb_…), username, or full email address owned by this key | |
| add_labels | No | Labels to add on every resolved message. read and unread are allowed. System labels are not. | |
| message_ids | Yes | 1 to 50 unique message ids (msg_…). Ids that are not in this inbox are omitted. | |
| remove_labels | No | Labels to remove on every resolved message. Pass ["unread"] to mark them read. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Items on this page, in the order the tool description gives. | |
| count | No | How many items the call returned or changed. | |
| limit | No | Page size that was applied. | |
| object | No | Object type name, such as list, message, or thread. |