Skip to main content
Glama

list_labels

Read-onlyIdempotent

Retrieve all Gmail labels and their IDs so you can map label names before modifying message labels. Read-only; includes system and user labels.

Instructions

List all labels in the account as {labels:[{id,name,type}]}, covering system labels (INBOX, UNREAD, STARRED, SPAM, TRASH) and user labels. Use it to map label names to the IDs modify_message_labels needs. Read-only; does not create labels.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountYesAccount alias from list_accounts; selects which mailbox to use.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / account / description
      Added value: +"Account alias from list_accounts; selects which mailbox to use."
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so the 'Read-only' clause mostly reinforces structured data. The description earns credit by disclosing the exact return shape {labels:[{id,name,type}]} and the coverage of both system and user labels, which the annotations do not convey.

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 tight clauses: what it returns, what it covers, and why to call it. The high-value information (return shape and the modify_message_labels linkage) is front-loaded with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description carries the return-value burden itself and does so precisely with the {labels:[{id,name,type}]} shape. Combined with the documented account parameter and the read-only profile, nothing needed to call it correctly is missing.

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?

Only one parameter, fully documented in the schema (100% coverage, enum of account aliases sourced from list_accounts). The description adds nothing beyond the implicit 'in the account' scoping, so the baseline 3 is correct.

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?

Specific verb+resource ('List all labels in the account'), with the response shape and the label scope (system vs user) spelled out. It is clearly distinguishable from siblings like list_accounts and search_messages, and it names modify_message_labels as the downstream consumer.

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?

It gives an explicit reason to call it — 'to map label names to the IDs modify_message_labels needs' — which tells the agent when this tool is the right one. It also excludes one misuse ('does not create labels'), though there is no true alternative sibling to disambiguate against.

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