Skip to main content
Glama
YimingYAN

gmail-labels-mcp-server

by YimingYAN

List Gmail Labels

gmail_list_labels
Read-onlyIdempotent

List all Gmail labels, including system and user-created, with their IDs, names, types, and message counts. Use this to find the label ID needed for add/remove operations.

Instructions

List all labels (tags) in the Gmail account.

Returns both system labels (INBOX, SENT, TRASH, etc.) and user-created labels. Use this to find label IDs needed for add/remove operations.

Returns: List of labels with their IDs, names, types, and message counts.

Examples:

  • Use when: "Show me all my Gmail labels"

  • Use when: "What label ID does 'Finance' have?"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations already declare the operation read-only, idempotent, and non-destructive. The description adds that both system and user-created labels are returned, along with their IDs, names, types, and message counts, giving a clearer picture of the response without contradicting annotations.

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?

Four sections—purpose, scope, return details, and two concrete usage examples—are packed into a compact description with no filler. Every line adds value.

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 zero-parameter read-only tool, the description fully specifies its output, clarifies its use cases, and implies the broader label-management workflow via sibling tools. No output schema exists, but the return list is described in sufficient detail.

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 accepts zero parameters, so the schema fully covers all inputs. The description mentions the return fields (IDs, names, etc.), which is useful context but not required for parameter understanding.

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 opens with 'List all labels (tags) in the Gmail account', clearly identifying the action and resource. It distinguishes itself from sibling write tools by noting its role in finding label IDs for 'add/remove operations'.

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?

Provides explicit 'Use when' examples for common queries and mentions 'Use this to find label IDs needed for add/remove operations', indicating when it should be chosen over mutation tools. Sibling tools for creating/deleting/modifying labels make the context unambiguous, though no direct 'when not to use' statement is included.

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/YimingYAN/gmail-labels-mcp-server'

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