Skip to main content
Glama

Merge duplicate Gmail labels

merge_duplicate_gmail_labels
Destructive

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

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

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is covered. The description still adds meaningful nuance beyond that: only *emptied* duplicates are deleted (messages themselves are preserved, just relabeled), and a user confirmation is required. It stops short of describing partial-failure behavior or whether the deletion is reversible.

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: the effect first, the precondition second, with zero filler. Front-loaded with the destructive action so the agent grasps impact before reading the confirmation instruction.

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 three-parameter mutation with no output schema, the description covers what changes and the required confirmation gate. It omits what happens on partial failure and whether any result summary is returned, which are minor gaps given the low complexity and full schema coverage.

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 100%, so mailbox, labelIds, and keepLabelId are already fully documented in the schema, including the requirement that labelIds contain the kept label. The description reinforces the relabel target but adds no syntax, grouping constraints, or id-resolution guidance beyond the schema.

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 precise verb+resource+scope: it relabels every message carrying any of a set of duplicate labels onto a single survivor, then deletes the emptied duplicates. That two-step effect (relabel-then-delete, only the emptied labels) is specific enough to distinguish it from apply_gmail_labels, delete_gmail_label, and 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?

Provides a clear human-in-the-loop precondition, 'Ask the user to confirm before calling this,' which is real procedural guidance rather than boilerplate. It never names the natural upstream sibling (find_duplicate_gmail_labels) or states when to prefer a plain relabel/delete instead, so an exclusion clause is missing.

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