Skip to main content
Glama

batch_modify_gmail_message_labels

Batch add or remove labels on multiple Gmail messages in a single API call using the Gmail batchModify endpoint.

Instructions

Add or remove labels on many Gmail messages in one API call.

Side effects: mutates label sets on every message in message_ids. Uses the Gmail batchModify endpoint (up to 1000 IDs per call — Gmail's limit, not enforced here). For single messages use modify_gmail_message_labels. Requires the gmail.modify OAuth scope.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_google_emailYesThe user's Google email address (authenticated account).
message_idsYesGmail message IDs from search_gmail_messages.
add_label_idsNoLabel IDs to add across all messages. Use system IDs ("INBOX", "TRASH", "UNREAD") or user label IDs from list_gmail_labels. Names do NOT work.
remove_label_idsNoLabel IDs to remove across all messages.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It discloses that the tool mutates label sets on every message and notes the Gmail API limit not enforced. While it doesn't detail error handling or atomicity, it provides sufficient behavioral context for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three compact sentences: purpose, side effects and API detail, sibling tool and auth. Every sentence adds value with no redundancy or unnecessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema, the description need not cover return values. It adequately covers purpose, behavioral traits, limits, alternatives, and auth. Minor gaps like error handling or batch size enforcement are acceptable for a batch tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 100% coverage, with each parameter clearly described (e.g., message_ids from search, label IDs with system/user distinction). The description adds no additional parameter details beyond the schema, so baseline score applied.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states the tool adds or removes labels on many Gmail messages, clearly defining the action and resource. It also distinguishes from the sibling tool by noting that single messages should use modify_gmail_message_labels.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool (batch operations) and when not to (single messages, directing users to modify_gmail_message_labels). It also mentions the Gmail API limit of 1000 IDs and the required OAuth scope, helping agents select correctly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HuntsDesk/ve-gws'

If you have feedback or need assistance with the MCP directory API, please join our Discord server