Skip to main content
Glama

gmail_label

Apply or remove labels on selected Gmail conversations by index, search query, folder, or subject match to organize messages and update label assignments.

Instructions

Apply and/or remove labels on conversations ('Label as' dialog; 'Inbox' is a label too).

The result lists the labels offered by the dialog ('labels').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addNoLabel names to apply (case-insensitive).
allNoAct on EVERY conversation of the query/folder list (Gmail's 'Select all' after loading the whole list; repeated until the list is empty for actions that remove conversations from it). Needs query or folder; no index/indexes/match.
indexNoRow index from gmail.list / gmail.search (0 = first row).
matchNoSelect every row whose subject contains this text (case-insensitive).
queryNoRun this Gmail search first and take the rows from its results.
folderNoOpen this folder/label first and take the rows from it.
removeNoLabel names to remove.
indexesNoSeveral row indexes (multi-selection).
max_rowsNoWith match, look at most at this many rows from the top.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the UI-dialog framing and the return shape ('result lists the labels offered by the dialog'), which matters because no output schema exists. What is missing is mutation behavior: what happens if neither add nor remove is set, whether the selection parameters are mutually exclusive, and whether the action 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.

Conciseness4/5

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

Two sentences, front-loaded with the action, no waste. The dialog/return-shape remarks are compact. It could be tighter but every clause carries information.

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?

For a 9-parameter selection-heavy mutation tool with no annotations and no output schema, the definition is only partially complete. Return shape is covered, but the interplay among index/indexes/match/query/folder/all and the safety profile of a label mutation are left entirely to the schema.

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 coverage is 100%, so the schema already documents all 9 parameters in detail. The description adds only the note that 'Inbox' is itself a label, which slightly informs add/remove semantics. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Apply and/or remove labels on conversations'. An agent can tell it apart from label-management siblings like gmail_create_label or gmail_labels. However, it never names those siblings, so differentiation is inferred rather than explicit.

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 parenthetical '("Label as" dialog; "Inbox" is a label too)' implies the UI context and a subtle edge case, which is useful. But there is no explicit when-to-use guidance versus gmail_move, gmail_archive, or gmail_create_label, and no exclusion conditions.

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

Deploy Server

Other Tools