Skip to main content
Glama

List Gmail labels

list_labels
Read-onlyIdempotent

Lists Gmail system + user labels (id/name/type) for a Google inbox. Use the user label ids with label_messages and unlabel_messages; system labels (INBOX, SPAM, TRASH...) are refused there. For non-Google inboxes, prefer list_folders.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "inboxId": "<inboxId>"
    },
    "name": "list_labels"
  }
}

Input Schema

NameRequiredDescriptionDefault
inboxIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld, so the safety profile is covered. The description adds non-obvious behavior beyond that: the id/name/type shape of what comes back and the important constraint that system labels are rejected by the label/unlabel tools. It stops short of saying whether the listing is paginated or reflects all labels unconditionally.

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, each earning its place: what it returns, how to use the ids, and which sibling to prefer otherwise. Front-loaded with the primary purpose and no filler.

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 one-parameter read tool with full annotations, the description is nearly sufficient — it even enumerates return fields in lieu of an output schema. The remaining gap is practical: the source of a valid inboxId is not stated, which matters since the schema gives no hint.

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?

Single parameter inboxId with 0% schema description coverage, so the description must carry the burden. It implies the inbox must be a Google-backed inbox ('for a Google inbox') which constrains valid values, but never names inboxId or explains where to obtain a valid id (e.g. list_inboxes).

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 specific verb and resource ('Lists Gmail system + user labels') and even the returned fields (id/name/type), scoping it to a Google inbox. It explicitly distinguishes itself from list_folders, so an agent can route correctly without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Gives explicit downstream usage ('Use the user label ids with label_messages and unlabel_messages'), an exclusion ('system labels ... are refused there'), and the alternative ('For non-Google inboxes, prefer list_folders'). This covers when-to-use, when-not, and the sibling to pick instead.

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