Skip to main content
Glama

Merge duplicate Gmail labels

merge_duplicate_gmail_labels

Re-label every message carrying any of a set of duplicate labels with one label to keep, then delete the emptied duplicates. Ask the user to confirm before calling this.

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.
labelIdsYesAll label IDs in the duplicate group, including the one to keep
keepLabelIdYesThe label ID that should survive; the rest are relabeled away and deleted

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the core behavior (relabel and delete) but does not mention potential side effects, irreversibility, or any risks beyond deletion. The instruction to ask for confirmation is more of an agent directive than a description of tool behavior. It lacks details on what happens if labels are not empty or whether the operation is atomic, making the transparency only partial.

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 extremely concise, consisting of just two sentences. It front-loads the primary action (relabel and delete) and then adds a critical safety instruction. There is no wasted wording, and the structure makes it easy for an agent to quickly grasp the tool's purpose and the need for user confirmation.

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 tool is a destructive mutation operation with no annotations and no output schema. The description explains the process but does not mention that duplicates should be identified beforehand (e.g., via find_duplicate_gmail_labels), nor does it describe any return values. It also does not address potential limitations or edge cases. While the schema provides mailbox guidance, the overall context is incomplete for an agent to safely invoke this tool without additional knowledge.

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?

The input schema already provides detailed descriptions for all three parameters, including mailbox (with a pointer to list_authorized_mailboxes), labelIds (including the one to keep), and keepLabelId. Since schema coverage is 100%, the baseline is 3. The tool description adds context about the overall workflow but does not introduce new parameter-specific meaning beyond what the schema states.

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's action: 'Re-label every message carrying any of a set of duplicate labels with one label to keep, then delete the emptied duplicates.' This is a specific verb+resource combination that distinguishes it from related tools like rename_gmail_label, delete_gmail_label, or create_gmail_label. The title and name align perfectly, leaving no ambiguity about 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 Guidelines3/5

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

The description includes the instruction 'Ask the user to confirm before calling this,' which is a usage guideline about requiring user consent. However, it does not explicitly mention when to use this tool versus alternatives like find_duplicate_gmail_labels, nor does it state that duplicates must first be identified. The guidance is minimal and leaves the agent to infer the proper workflow.

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