Skip to main content
Glama

gmail_bulk_label_matching

Idempotent

Search Gmail by query and bulk add or remove labels on all matching messages in one call. Creates missing labels automatically.

Instructions

Search Gmail with a query, then add/remove labels on every matching message in one shot (search + batchModify). Resolves label names to IDs and can create missing add-labels. Use for bulk tagging of a query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already indicate readOnly=false, idempotent=true, and destructive=false. The description adds meaningful behavior context: it resolves label names to IDs and can create missing add-labels. This goes beyond the annotations, though it does not mention the max_results cap which could affect the 'every matching message' claim.

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?

Three concise sentences, front-loaded with the primary search-and-modify behavior. Each sentence adds necessary context: the operation, the resolution behavior, and the primary use case. No filler or redundancy.

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?

The description covers the main workflow and special behaviors but misses the max_results limit, which is important because 'every matching message' could be misleading given the default cap of 500. The output schema exists, so return values don't need explanation, but the incomplete mention of limitations prevents a higher score.

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 0%, so the description must compensate. It does mention 'query' and label names (add/remove) and 'create missing add-labels', mapping to add_label_names and create_missing_labels. However, it does not describe max_results or the exact semantics of label resolution beyond a general statement. The schema itself provides detailed parameter descriptions, but the tool description adds only moderate value.

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 tool searches Gmail with a query and then adds/removes labels on every matching message, combining search and batchModify. This distinguishes it from sibling tools like gmail_search_emails (search-only) and gmail_apply_labels (label-by-IDs). The verb+resource+scope is specific and unambiguous.

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 phrase 'Use for bulk tagging of a query' provides direct guidance on when to use the tool. The description also implies it is the right choice when you need to apply labels to search results, as opposed to labeling specific message IDs. It doesn't explicitly name alternatives or exclusions, but the context is clear enough.

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/yama662607/inbox-mcp'

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