Skip to main content
Glama

gmail.users.labels.list

Lists all labels in a user's Gmail mailbox so you can retrieve label IDs and names for organizing, filtering, or managing messages.

Instructions

Lists all labels in the user's mailbox. For more information, see Manage labels [HTTP GET]. Returns the requested resource as JSON — request bodies are built from the typed parameters (typed flags win over the params map), or read whole from body_file Siblings over the same resource: create, delete, get, patch, update.

Input Schema

NameRequiredDescriptionDefault
queryNoExtra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe.
paramsNoParameter map merged into the request; typed parameters win.
userIdYes[URL path segment] The user's email address. The special value `me` can be used to indicate the authenticated user.me
dry_runNoReturn the request that would be sent, without sending it.
body_fileNoRead the request body from this file ('-' for stdin) instead of building one from the parameters.

Output Schema

NameRequiredDescriptionDefault
labelsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / userId / default
      Added value: +"me"
    • changedInput schema / properties / userId / description
      Previous value: -"The user's email address. The special value `me` can be used to indicate the authenticated user."New value: +"[URL path segment] The user's email address. The special value `me` can be used to indicate the authenticated user."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "labels": {
      +      "items": {
      +        "properties": {
      +          "color": {
      +            "properties": {
      +              "backgroundColor": {
      +                "type": "string"
      +              },
      +              "textColor": {
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "labelListVisibility": {
      +            "enum": [
      +              "labelShow",
      +              "labelShowIfUnread",
      +              "labelHide"
      +            ],
      +            "type": "string"
      +          },
      +          "messageListVisibility": {
      +            "enum": [
      +              "show",
      +              "hide"
      +            ],
      +            "type": "string"
      +          },
      +          "messagesTotal": {
      +            "type": "integer"
      +          },
      +          "messagesUnread": {
      +            "type": "integer"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "threadsTotal": {
      +            "type": "integer"
      +          },
      +          "threadsUnread": {
      +            "type": "integer"
      +          },
      +          "type": {
      +            "enum": [
      +              "system",
      +              "user"
      +            ],
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. It does disclose that this is an HTTP GET returning JSON, which establishes read-only semantics, but the generic paragraph about request bodies, typed parameters and body_file is boilerplate that describes a capability a list call does not use.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The purpose is front-loaded correctly in the first sentence, but the follow-on boilerplate about request-body construction and body_file is irrelevant to a parameterless GET and dilutes the signal. Roughly half the text does not earn its place for this specific tool.

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?

The tool is simple and an output schema exists, so return-value detail is not needed. However, with no annotations and a generic wrapper boilerplate section, the description omits anything about auth/user scoping beyond the schema's `me` default and says nothing about how many labels or ordering are returned.

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 the schema already documents userId, params, query, dry_run and body_file; baseline 3 applies. The description adds only the precedence rule that typed flags win over the params map, which is marginal beyond what the schema states.

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?

The description names a specific verb and resource ('Lists all labels in the user's mailbox') and enumerates the sibling operations over the same resource. An agent can distinguish it from gmail.users.labels.get/create/delete without opening schemas, though the sibling list is a bare enumeration rather than a routing statement.

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 sibling enumeration ('create, delete, get, patch, update') implies this is the read-all variant, but there is no explicit when-to-use condition, no prerequisite/scope note, and no mention of paging behavior for large label sets. Usage is inferable from the name and sibling listing only.

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