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

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

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, openWorldHint=false, so the safety profile is covered. The description adds meaningful behavioral context beyond that: the 1000-message batch ceiling and the combined add/remove semantics. It does not say whether the operation is idempotent or what happens if a label ID is invalid.

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, front-loaded with the action and scale, followed by the folder-move analogy. No filler or restatement of the tool name.

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 mutation tool with 25% schema coverage and no output schema, the description covers the operational model and batch limit but leaves the mechanics of messageIds and label IDs unaddressed. Adequate as a minimum, not complete.

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 description coverage is only 25% (mailbox only), so the description must carry more weight. It explains the intent of addLabelIds/removeLabelIds qualitatively and caps messageIds scope at 1000, but adds no format or source details — e.g., where label IDs come from (list_gmail_labels) or what messageIds accepts.

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?

States a specific verb pair (add/remove), the resource (labels), and the scope (up to 1000 messages at once). The 'Gmail's equivalent of moving messages between folders' framing also separates it from sibling label tools like create_gmail_label or rename_gmail_label.

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?

Gives an explicit operating pattern — 'add the destination label and remove INBOX (or the source label) in the same call' — which is real when-to-use guidance. It stops short of naming a sibling alternative (e.g., move_messages or update_agentmail_labels) or stating when not to use this tool.

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