Skip to main content
Glama

List labels

labels_list
Read-only

List the labels a connected mailbox holds, by the id each is applied by. A mailbox whose provider is imap holds its folders as labels, nested by /, beside UNREAD, STARRED and SPAM. An Outlook mailbox's labels are its categories, of type category, and its own folders, of type folder, each named by its path with how many messages it holds and how many are unread; Outlook's own folders - the inbox, sent mail, drafts, Deleted Items, Junk and the like - are not labels. A Gmail connected by Google sign-in also holds Gmail's own labels, of type system, among them IMPORTANT, Gmail's mark of what matters, and its inbox tabs as CATEGORY_PERSONAL, CATEGORY_SOCIAL, CATEGORY_PROMOTIONS, CATEGORY_UPDATES and CATEGORY_FORUMS, which threads_modify applies and removes as it does the person's own.

Input Schema

NameRequiredDescriptionDefault
mailboxYesThe mailbox's name or its email address.

Output Schema

NameRequiredDescriptionDefault
labelsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / labels / items / properties / messagesTotal
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / labels / items / properties / messagesUnread
      Added value: +{
      +  "type": "number"
      +}
  2. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Changed2 schema fields changed
    • removedOutput schema / properties / labels / items / properties / type / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / labels / items / properties / type / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  4. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, closed-world), so the description is free to add the genuinely useful part: how labels differ per provider (IMAP folders, Outlook categories/folders with counts, Gmail system labels and CATEGORY_* tabs) and which Outlook folders are excluded. It stops short of describing pagination or ordering, but the provider semantics are real added value.

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 information is front-loaded correctly (what it lists, then per-provider semantics), but it is one dense paragraph with run-on sentences such as the Outlook sentence stacking path, counts and unread counts. Phrases like "Gmail's mark of what matters" are filler that dilute an otherwise technical description.

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?

An output schema exists, so return shape need not be explained, and the description instead supplies the interpretive context an agent needs to read label ids and types. Pagination and result limits are the only notable omissions for a list operation.

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 coverage is 100% with a single well-described 'mailbox' parameter (name or email), so baseline is 3. The description reinforces the notion of a 'connected mailbox' with provider-dependent behavior but adds no syntax or format detail beyond the schema.

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 first sentence gives a specific verb and resource: listing the labels a mailbox holds, keyed by label id. It is unambiguous against the mutation siblings (labels_create/update/delete), but it never explicitly contrasts itself with those siblings or with threads_get which also surfaces label ids.

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 only implied: an agent can infer from 'List' and readOnlyHint that this is the discovery step, and the closing reference to threads_modify hints at how labels are consumed. There is no explicit 'use this before labels_update or threads_modify to obtain ids' statement, and no exclusions.

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.