add_labels
Add a label to multiple Gmail messages in a single batch request, using batchModify to process up to 1000 IDs per API call, avoiding separate calls per message.
Instructions
CHOICE HINT: When the user asks to "add a label" to multiple emails,
ALWAYS prefer this tool over making N calls to add_label(). It uses
Gmail's batchModify API in chunks of at most 1000 message IDs.
Add a label to multiple emails in a single MCP request.
Uses messages().batchModify() with up to 1000 IDs per Gmail API call.
Required:
message_ids (list[str]) — Gmail message IDs.
label (str) — label name. System labels: STARRED, IMPORTANT, etc.
Custom labels must exactly match how they appear in Gmail.
Returns on success:
{"ok": true, "data": {
"requested": N, "succeeded": N, "failed": 0,
"results": [{"id": "...", "ok": true}, ...]
}}
Workflow note: Use this instead of N add_label() calls.
Label names are case-sensitive.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | Yes | ||
| message_ids | Yes |