modify_labels
Add or remove Gmail labels on a message or thread to archive, mark read/unread, star, or organize mail by label IDs.
Instructions
Add or remove labels on a message or an entire thread.
Common label IDs: INBOX (archive = remove INBOX), UNREAD (mark read = remove UNREAD; mark unread = add UNREAD), STARRED, IMPORTANT, TRASH, SPAM. User labels use their id from list_labels.
Args: add_label_ids: Label IDs to add. remove_label_ids: Label IDs to remove. message_id: Target a single message. Provide message_id or thread_id, not both. thread_id: Target every message in a thread. Provide message_id or thread_id, not both.
Returns: For a message: id, thread_id, label_ids. For a thread: id and messages (id + label_ids each). On failure, {"error": "..."}.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "modify_labels"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| thread_id | No | ||
| message_id | No | ||
| add_label_ids | No | ||
| remove_label_ids | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||