Skip to main content
Glama
Google Workspace MCP Server

Google Workspace MCP Server

by ChinmayNakwa

List Gmail Labels

list_gmail_labels
Read-onlyIdempotent

Lists Gmail labels for a specified Google account, with options to filter by prefix, include or exclude system labels, and return compact JSON for parsing.

Instructions

Lists labels in the user's Gmail account.

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": {
      "user_google_email": "<user_google_email>"
    },
    "name": "list_gmail_labels"
  }
}

Input Schema

NameRequiredDescriptionDefault
prefixNoReturn only labels whose name starts with this exact (case-sensitive) string. users.labels.list accepts no filter, so the full list is fetched and narrowed here: this shrinks what the caller receives, not the API call.
compactNoReturn minimal JSON {"count", "labels": [{"id", "name"}]} sorted by name, instead of the formatted text list. For callers that parse the result, e.g. a label cache refresh.
include_systemNoInclude Gmail system labels (INBOX, SENT, ...). Set False to return user labels only.
user_google_emailYesThe user's Google email address. Required.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.1

TDQS

B3.4/5.0
Behavior2/5

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

The description adds no behavioral traits beyond what annotations already provide. It does not mention auth requirements, rate limits, or that the operation is non-destructive (though annotations already cover safety). The description is effectively a tautology of the tool name, adding no new behavioral insight.

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 a single short sentence with no wasted words. It is appropriately sized for the simple read-only operation, and the essential information is front-loaded.

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?

Given the tool's simple read-only nature, the rich parameter descriptions, the existing output schema, and the safety annotations, the description is adequate for an agent to invoke it correctly. An output schema exists, so the description does not need to explain return values. It lacks nothing critical for a basic 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 description coverage is 100%, so the baseline is 3. The tool description itself contains no parameter information, but the schema provides thorough explanations for all four parameters, including the 'prefix' behavior of narrowing client-side rather than server-side. The description adds no extra parameter meaning.

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 a specific verb ('Lists') and resource ('labels in the user's Gmail account'). It clearly distinguishes from siblings such as manage_gmail_label (create/update/delete) and list_gmail_filters (filters, not labels). An agent can immediately understand what the tool does and which sibling it is not.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use this tool versus alternatives. It does not mention that manage_gmail_label should be used for label creation/modification, nor does it note any preconditions or exclusions. There is no explicit or implicit usage context beyond the bare action.

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