Skip to main content
Glama

list_labels

Read-onlyIdempotent

Retrieve Gmail label IDs, names, and types to identify system and user labels for labeling or unlabeling messages via label IDs or exact names.

Instructions

List Gmail labels (id, name, type system/user): system labels first, then the user's.

label_* and unlabel_* take these IDs (or the exact names).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
codeNo
countNo
errorNo
labelsNo
statusYes
warningNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv0.12.3
    • addedOutput schema / $defs
      Added value: +{
      +  "Label": {
      +    "properties": {
      +      "id": {
      +        "title": "Id",
      +        "type": "string"
      +      },
      +      "name": {
      +        "title": "Name",
      +        "type": "string"
      +      },
      +      "type": {
      +        "title": "Type",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "name",
      +      "type"
      +    ],
      +    "title": "Label",
      +    "type": "object"
      +  }
      +}
    • addedOutput schema / properties / code
      Added value: +{
      +  "title": "Code",
      +  "type": "string"
      +}
    • addedOutput schema / properties / count
      Added value: +{
      +  "title": "Count",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / error
      Added value: +{
      +  "title": "Error",
      +  "type": "string"
      +}
    • addedOutput schema / properties / labels
      Added value: +{
      +  "items": {
      +    "$ref": "#/$defs/Label"
      +  },
      +  "title": "Labels",
      +  "type": "array"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "title": "Result",
      -  "type": "string"
      -}
    • addedOutput schema / properties / status
      Added value: +{
      +  "title": "Status",
      +  "type": "string"
      +}
    • addedOutput schema / properties / warning
      Added value: +{
      +  "title": "Warning",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "status"
      +]
    • changedOutput schema / title
      Previous value: -"list_labelsOutput"New value: +"LabelsResult"
  2. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/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 safety profile is covered. The description adds a genuine behavioral detail — system labels are returned before user labels — and notes that IDs are accepted downstream by label_*/unlabel_*. It says nothing about volume, pagination, or auth, so it remains a modest add-on rather than rich disclosure.

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 short sentences, zero waste, with the core action and return shape front-loaded and the downstream-consumption note second. Every clause carries 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?

With an output schema present, the description need not explain return structure, and with no parameters there is no schema gap to fill; the ordering note and the downstream-ID note round it out. Only a brief mention of auth/account scope (openWorldHint) is absent, a minor gap.

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 tool takes zero parameters, so the baseline is 4; the description correctly adds no parameter talk and instead documents the shape of the returned identifiers, which is the only input-relevant fact (they feed label_*/unlabel_*).

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 uses a specific verb and resource ('List Gmail labels') and even names the fields returned (id, name, type system/user) plus the ordering. That is well beyond a tautology, though it never explicitly contrasts itself with the sibling create_label, leaving the read/write split to be inferred from the verb.

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?

The second sentence tells the agent exactly why it would call this tool: to obtain the IDs (or exact names) that label_*/unlabel_* require. That is a concrete usage context, but there is no explicit 'do not use this to create/modify labels — use create_label' exclusion.

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