Skip to main content
Glama

Gmail: List labels

gmail_list_labels
Read-only

List all Gmail system and user labels with their IDs so you can use them to mark messages read or unread and add or remove labels.

Instructions

[UNIFIED] List all Gmail labels (system + user) with their ids. System label ids include INBOX, UNREAD, STARRED, IMPORTANT, TRASH, SENT, DRAFT. Use these ids with mark_read / mark_unread / add_label / remove_label.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site": "<site>"
    },
    "name": "gmail_list_labels"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.14.0

TDQS

A4.1/5.0
Behavior4/5

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

readOnlyHint=true already covers the safety profile, but the description adds real value by enumerating the concrete system label ids (INBOX, UNREAD, STARRED, IMPORTANT, TRASH, SENT, DRAFT) that callers can rely on. It does not mention any result cap or whether user labels can be absent, so it doesn't fully describe the shape of what returns.

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?

Three tight sentences: purpose first, then the concrete id values, then the downstream usage. The '[UNIFIED]' prefix is minor noise but no sentence is wasted.

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 simple read-only list tool with no output schema, the definition covers what is returned (labels plus ids) and why. The remaining gap is the undocumented 'site' parameter and the absence of any note on result size or auth, which keeps it from being fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has one required parameter, 'site', with 0% description coverage, and the description never mentions it or explains what value is expected. With low schema coverage the description is supposed to compensate, and here it adds nothing about the only input.

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?

States a specific verb and resource (list Gmail labels), scopes the result (system + user), and discloses what comes back (ids). An agent can immediately distinguish this from gmail_list_messages or gmail_get_message.

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?

Explicitly routes the output forward: 'Use these ids with mark_read / mark_unread / add_label / remove_label,' which tells the agent this is a discovery step for those mutation tools. It stops short of stating when-not to call it (e.g., no filtering options, always full list), so not a 5.

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