Skip to main content
Glama

gmail_apply_labels

Add or remove Gmail labels on specific messages across multiple accounts, with confirmation required for destructive TRASH or SPAM labels.

Instructions

Add and/or remove labels on Gmail messages. Label names may also be Gmail label IDs. Adding TRASH or SPAM destroys mail after Gmail's 30-day purge, so that requires confirm: true; removing them does not.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountYesConfigured Gmail account alias, e.g. work, personal, support.
confirmNoRequired, and must be true, when addLabelNames includes TRASH or SPAM.
messageIdsYes
addLabelNamesNo
removeLabelNamesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/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 of behavioral disclosure. It explicitly warns about the destructive consequence of adding TRASH/SPAM (30-day purge) and the confirm requirement, which is a significant behavioral trait. However, it does not mention other potential side effects, permissions, or idempotency, leaving some gaps for a mutation tool.

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 main action and immediately followed by the critical destructive-warning. No unnecessary words; every sentence adds essential information.

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?

Given the tool's simplicity and lack of output schema, the description covers the key operational constraints (confirm requirement, label ID flexibility). It does not clarify the format of messageIds (e.g., that they are Gmail message IDs), but this is reasonably inferable from the tool name and context. The absence of an output schema makes return-value explanation unnecessary. Overall, sufficient for an agent to invoke 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?

The description adds value beyond the schema: it explains that label names may be Gmail label IDs (not in schema) and clarifies the confirm parameter's purpose in context of TRASH/SPAM. The schema covers only 40% of parameters (account and confirm have descriptions; messageIds, addLabelNames, removeLabelNames lack descriptions), so the description helps by implying the meanings of add/remove label arrays, though it does not explicitly define them.

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 action ('Add and/or remove labels') on a specific resource ('Gmail messages'), and clarifies that label names may be IDs. It clearly distinguishes from siblings like gmail_create_label or gmail_update_label which operate on label definitions, not messages.

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 gives a crucial usage caveat (TRASH/SPAM require confirm:true, removal does not) but does not explicitly explain when to choose this tool over alternatives such as gmail_archive or gmail_read_message. The usage context is implied by the name and purpose, but no direct guidance on alternative selection is provided.

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