gws-mcp__gmail_label_message
Label many messages in ONE call: pass message_ids (up to 1000) with add_labels and/or remove_labels, and every message is modified by a single users.messages.batchModify request. Do not call this once per message. The label-and-mark-read pair is one call: add_labels: [""], remove_labels: ["UNREAD"]. Removing INBOX archives; removing UNREAD marks read. Label IDs come from gmail_list_labels. Returns a per-message outcome (results[]: id, ok, error) so a partial batch is visible; if the batch request is refused, each id is retried on its own and reported. message_id is for a single message only; thread_id labels every message of one conversation.
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": "gws-mcp__gmail_label_message"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Optional email address of the connected account to use (e.g. 'user@gmail.com'). If omitted, the default account is used. | |
| thread_id | No | A thread ID, to label or unlabel every message in that conversation in one call, as Gmail does when a conversation is selected. Provide this instead of message_id or message_ids. | |
| add_labels | No | Label IDs to add, e.g. ["Label_12"] | |
| message_id | No | A single message ID, for the one-message case only. Provide either this or message_ids. | |
| message_ids | No | The message IDs to modify together in one call, up to 1000. Prefer this over message_id whenever there is more than one message. | |
| remove_labels | No | Label IDs to remove, e.g. ["INBOX"] to archive or ["UNREAD"] to mark read; combine with add_labels to label and mark read in the same call |