Skip to main content
Glama
A1-x-Tech

A1 Gmail MCP

List labels

list_labels
Read-onlyIdempotent

Get all Gmail labels with IDs, or pass a label_id to retrieve that label's message and thread counts.

Instructions

Without label_id: lists every label in the mailbox — system labels (INBOX, SENT, DRAFT, SPAM, TRASH, UNREAD, STARRED, IMPORTANT, CATEGORY_*) and user labels with their ids — the vocabulary that list_messages label_ids and modify_message add/remove_label_ids speak. With label_id: fetches that one label including its counts (messagesTotal, messagesUnread, threadsTotal, threadsUnread), which the plain list does not carry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
label_idNoFetch one label with counts instead of listing all.
Behavior4/5

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

Annotations already mark this as read-only, idempotent, and non-destructive. The description adds behavioral context beyond that: it specifies that system labels are included, and that the plain list does not carry counts, while the single-label fetch does. This is useful supplemental information.

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?

The description is two sentences, front-loading the default mode and then the optional mode. No wasted words; each sentence earns its place. The structure is logical and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one optional parameter and no output schema, the description is complete. It explains both call patterns, what each returns, and its role in the broader API context. There's nothing an agent needs to call it correctly that is missing.

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?

Input schema covers the single parameter at 100%, so baseline is 3. The description adds value by specifying exactly which counts are returned (messagesTotal, messagesUnread, threadsTotal, threadsUnread), which is not in the schema. This elevates the score to 4.

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?

The description clearly states the tool's function: listing all labels or fetching a specific label with counts, distinguishing between the two modes. It also positions the tool as the vocabulary source for other tools like list_messages and modify_message, which effectively differentiates it from sibling tools.

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?

The description explicitly states when to use each mode: 'Without label_id' for all labels, 'With label_id' for a single label with counts. It also explains that counts are only available with label_id, providing clear, actionable guidance without ambiguity.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/A1-x-Tech/mcp-google-gmail'

If you have feedback or need assistance with the MCP directory API, please join our Discord server