Skip to main content
Glama

list_labels

Read-only

Lists all system and user-defined labels in the authenticated mailbox, returning each label’s ID, name, type, and visibility settings for mailbox organization and filtering.

Instructions

List all labels in the authenticated user's mailbox (system and user-defined).

Returns: List of labels with id, name, type, message_list_visibility, and label_list_visibility. On API failure, {"error": "..."}.

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
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description still adds real value by enumerating the returned fields and disclosing error behavior ({"error": "..."}) on API failure, which is behavioral information 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.

Conciseness4/5

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

Two short, front-loaded sentences with a clearly separated return block; nothing is wasted. The return-field enumeration is slightly redundant given an output schema exists, but it is compact and does not obscure the purpose.

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 zero-parameter read tool with annotations and an output schema, the definition covers scope, contents, and failure mode, leaving nothing an agent needs in order to call it correctly. The only omission is any routing hint toward modify_labels or other label operations.

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, which sets the baseline at 4. Nothing in the schema needs explanation and the description does not introduce any misleading parameter narrative.

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 states a specific verb and resource ("List all labels") plus the scope ("in the authenticated user's mailbox") and notes that both system and user-defined labels are included. The only sibling in the label domain, modify_labels, is not referenced, so differentiation is left to the agent.

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?

Usage is implied by the name and the read-only listing scope: it is the tool you call to enumerate labels. There is no explicit when-to-use or when-not-to-use guidance, and no mention of pairing with modify_labels for follow-up edits.

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