Skip to main content
Glama
cunicopia-dev

gmail-mcp

modify_labels

Add or remove labels on Gmail messages selected by ID or search query. Modifies matches in batches of 1,000 per API call.

Instructions

Add and/or remove labels on a SELECTION of messages — one id, a list of ids, or a Gmail search query (act on everything it matches). One message is just a selection of size one; there is no separate bulk vs single. Matches are modified in batches of 1000 in a single API call each. Labels accept ids or names (resolved to existing labels; does not create new ones). This is the general mutator: archive = remove INBOX, mark-read = remove UNREAD, star = add STARRED, etc. To send mail to Trash use the trash tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addNoLabel ids or names to add.
queryNoGmail search query; acts on EVERY matching message. Mutually-exclusive-ish with message_id(s).
removeNoLabel ids or names to remove.
accountYesEmail address of the authorized Gmail account to act on.
message_idNoA single message id (selection of one).
message_idsNoAn explicit list of message ids to act on.

Schema Changelog

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

  1. First observedv0.7.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it delivers: batching in groups of 1000, label names resolved to existing labels without creation, the unified single/bulk semantics, and the mapping of common actions to label operations. It does not discuss failure modes or side effects, but the core mutational behavior is well disclosed.

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

Conciseness4/5

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

The description is dense but front-loaded: it opens with the core selection semantics, then batching, then label resolution, then practical examples. Every sentence carries operational value. It is slightly long, but not bloated, and the structure supports quick comprehension.

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?

For a mutator with no annotations and no output schema, the description covers selection forms, batching, label-name resolution, and alternate routing to the trash tool. It lacks guidance on response/error behavior, but the operational usage is sufficiently detailed for an agent to invoke the tool correctly.

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%, setting a baseline of 3, but the description meaningfully enriches parameter understanding by explaining how message_id, message_ids, and query form alternative selection modes, and that add/remove values can be ids or names resolved to existing labels. This goes beyond the schema's terse param descriptions.

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 states a specific verb ('add and/or remove labels') and resource ('messages'), and precisely defines the selection scope: one id, a list of ids, or a search query. It also clearly positions itself as the general label mutator and explicitly distinguishes itself from the trash tool.

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 usage context: this is the general mutator, archive/mark-read/star are all expressed as label operations, and trash is explicitly delegated to the 'trash' tool. It does not explicitly contrast with the sibling 'bulk_action' tool, but it does clarify that bulk and single operations share one tool, reducing ambiguity.

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

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/cunicopia-dev/gmail-mcp'

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