Skip to main content
Glama

Apply/remove Gmail labels

apply_gmail_labels

Add and/or remove labels on up to 1000 messages at once. This is Gmail's equivalent of moving messages between folders — add the destination label and remove INBOX (or the source label) in the same call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mailboxYesEmail address of the connected Gmail/Google Workspace mailbox to act on. Call list_authorized_mailboxes to see available options.
messageIdsYes
addLabelIdsNo
removeLabelIdsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose a genuinely useful non-schema fact—the 1000-message batch cap—and the move-equivalent behavior of combining add and remove in one call. However, it never discloses the mutating nature of the operation, potential side effects of removing INBOX, idempotency, or partial-failure behavior, which an agent would benefit from knowing for a label-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?

Two sentences, no filler. The core action and batch limit are front-loaded in the first sentence, and the second sentence earns its place by clarifying the move semantics that would otherwise be ambiguous. Every phrase contributes.

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

Completeness3/5

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

For a 4-parameter, 2-required tool with no output schema and no annotations, the description covers the central call pattern well but omits practical invocation details: how to obtain label IDs, the implication of both label arrays being optional in the schema, behavior on partial batch failure, and the return value. The move analogy is strong, but an agent would still need to infer or probe several details.

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?

Schema coverage is only 25%—only mailbox is described—so the description must compensate for the undocumented messageIds, addLabelIds, and removeLabelIds. It partially does: explaining that add and remove happen 'in the same call' and that the destination label maps to addLabelIds while INBOX/source maps to removeLabelIds. But it doesn't specify where label IDs come from (e.g., list_gmail_labels), whether at least one of the arrays must be supplied, or messageId format, leaving clear gaps.

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 opens with a specific verb+resource: 'Add and/or remove labels on up to 1000 messages at once.' This clearly distinguishes it from siblings like create_gmail_label, delete_gmail_label, and rename_gmail_label, which operate on the label definitions themselves, not on messages. The folder-move analogy further anchors what the tool does.

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

Usage Guidelines4/5

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

The description gives clear contextual usage guidance: it frames the tool as 'Gmail's equivalent of moving messages between folders' and explains the exact recipe—'add the destination label and remove INBOX (or the source label) in the same call.' This tells an agent when to reach for it versus Outlook's move_messages. It stops short of explicitly naming alternatives or stating when-not-to-use scenarios, so it doesn't earn a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources