Skip to main content
Glama
taylorwilsdon

Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

Batch Modify Gmail Message Labels

batch_modify_gmail_message_labels
Destructive

Add or remove labels across multiple Gmail messages in a single batch request, then verify which IDs changed. Streamlines bulk label management without per-message calls.

Instructions

Adds or removes labels from multiple Gmail messages in a single batch request.

Takes MESSAGE ids, not thread ids. Gmail's batch endpoint returns no per-message result and silently ignores ids it does not recognise, so by default this reads the messages back afterwards and reports which ids actually changed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
verifyNoRead the messages back and report per-id outcomes. Costs one extra (batched) read per id. Set False for very large sweeps where that cost matters and an unverified result is acceptable.
message_idsYesA list of message IDs to modify.
add_label_idsNoList of label IDs to add to the messages.
remove_label_idsNoList of label IDs to remove from the messages.
user_google_emailYesThe user's Google email address. Required.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed3 schema fields changedv1.25.2
    • removedInput schema / properties / add_label_ids / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / remove_label_ids / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / verify
      Added value: +{
      +  "default": true,
      +  "description": "Read the messages back and report per-id outcomes. Costs\none extra (batched) read per id. Set False for very large sweeps\nwhere that cost matters and an unverified result is acceptable.",
      +  "type": "boolean"
      +}
  2. Addedv1.0.1

TDQS

A4.4/5.0
Behavior5/5

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

The description discloses behavior not visible in annotations: the batch endpoint silently ignores unrecognized ids, returns no per-message result, and defaults to reading messages back to verify which ids changed. This significantly strengthens the agent's understanding of the mutation's real-world behavior.

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 compact and front-loaded with the main action, then delivers the critical caveats in clear, economical sentences. Every sentence contributes actionable 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?

The description covers the most important operational quirks and the verify behavior, and an output schema exists so return values need not be spelled out. Minor gaps remain, such as not explicitly requiring at least one of add_label_ids or remove_label_ids and not naming the singular alternative for redirection.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds meaningful value by clarifying that message_ids must be MESSAGE ids rather than thread ids, and by explaining the verify parameter's purpose in relation to the endpoint's silent-id behavior.

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 clearly states the specific action ('adds or removes labels'), the resource ('multiple Gmail messages'), and the batching scope ('single batch request'). This distinguishes it from sibling message-label tools like 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 Guidelines3/5

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

The description implies use for batch label modifications and warns that it takes MESSAGE ids, not thread ids, which is useful guidance. However, it never explicitly names the singular sibling tool or states when to prefer this batch version over alternatives, leaving some selection inference to the agent.

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/taylorwilsdon/google_workspace_mcp'

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