Change thread labels / state
modify_threadApply read/unread, star, archive, or label changes to every message in a Gmail conversation in one call. Use it to mark an entire thread read or archive it without looping through individual messages.
Instructions
Applies the same normalized state changes as modify_message — read/unread, starred, archived, add_label_ids/remove_label_ids — to EVERY message in a conversation at once. Use it to mark a whole conversation read or archive it in one call instead of looping over messages. At least one change is required; repeating the same change is harmless. Returns the thread's new id and message label state.
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": {
"thread_id": "<thread_id>"
},
"name": "modify_thread"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| read | No | true = mark the whole thread read, false = unread. | |
| starred | No | true = star, false = unstar. | |
| archived | No | true = archive (remove from inbox), false = move back to inbox. | |
| thread_id | Yes | The thread id from list_threads or from a message's threadId field. | |
| add_label_ids | No | Label ids to add to every message. | |
| remove_label_ids | No | Label ids to remove from every message. |