Skip to main content
Glama
taylorwilsdon

Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

List Gmail Labels

list_gmail_labels
Read-onlyIdempotent

List Gmail labels for a user, filtering by prefix or limiting to user-created labels. Choose formatted or compact JSON output for easy parsing.

Instructions

Lists labels in the user's Gmail account.

Input Schema

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.28.0
    • removedInput schema / properties / prefix / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / prefix / type
      Added value: +"string"
  2. Changed3 schema fields changedv1.25.2
    • addedInput schema / properties / compact
      Added value: +{
      +  "default": false,
      +  "description": "Return minimal JSON {\"count\", \"labels\": [{\"id\", \"name\"}]}\nsorted by name, instead of the formatted text list. For callers\nthat parse the result, e.g. a label cache refresh.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / include_system
      Added value: +{
      +  "default": true,
      +  "description": "Include Gmail system labels (INBOX, SENT, ...).\nSet False to return user labels only.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prefix
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Return only labels whose name starts with this\nexact (case-sensitive) string. users.labels.list accepts no filter,\nso the full list is fetched and narrowed here: this shrinks what the\ncaller receives, not the API call."
      +}
  3. Changed7 schema fields changedv1.0.1
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / service
      Removed value: -{
      -  "title": "service",
      -  "type": "string"
      -}
    • addedInput schema / properties / user_google_email / description
      Added value: +"The user's Google email address. Required."
    • removedInput schema / properties / user_google_email / title
      Removed value: -"User Google Email"
    • changedInput schema / required
      Previous value: -[
      -  "service",
      -  "user_google_email"
      -]New value: +[
      +  "user_google_email"
      +]
    • removedInput schema / title
      Removed value: -"list_gmail_labelsArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "result": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "type": "object",
      +  "x-fastmcp-wrap-result": true
      +}
  4. First observedv1.0.0

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