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

Retrieve Gmail labels for a user account, filtering by name prefix and optionally excluding system labels for a cleaner result.

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. Dates show when Glama detected each change.

  1. 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."
      +}
  2. 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
      +}
  3. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

The annotations already carry the safety profile (readOnlyHint=true, openWorldHint=true, idempotentHint=true, destructiveHint=false), but the description itself adds zero behavioral context beyond restating the tool's name. It discloses no auth requirements, no account-scope nuances, and no output characteristics; notably, the schema's prefix parameter description ('the full list is fetched and narrowed here') does more behavioral disclosure than the tool description itself.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence with zero filler and the core action front-loaded. It is appropriately sized for a simple read tool. It doesn't earn a 5 because the brevity comes at the cost of omitting usage guidance that similar tools include as a second sentence.

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

Completeness3/5

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

With 100% schema coverage, detailed parameter descriptions, a present output schema, and four safety annotations, an agent can technically invoke and parse the result correctly. The description is adequate but complete only in a minimal sense: it fails to help an agent disambiguate between list_gmail_labels and list_gmail_filters, and it never states that this tool is the read-side counterpart to manage_gmail_label.

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 of 3 applies. The tool description mentions no parameters, but each of the four parameters carries a rich description in the schema, including prefix case-sensitivity and the fetch-then-narrow behavior, the compact JSON response shape, and the include_system toggle. The schema does the heavy lifting here, and the description adds nothing beyond it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Lists labels in the user's Gmail account' uses a specific verb (Lists) and a clear resource (labels in the user's Gmail account). It is precise about what is being listed and does not confuse the operation with mutation tools like manage_gmail_label. However, it does not explicitly differentiate from the closely related sibling list_gmail_filters, leaving the agent to infer the labels-vs-filters distinction.

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 offers no guidance on when to use this tool versus alternatives. With siblings like list_gmail_filters, manage_gmail_label, and modify_gmail_message_labels, an agent receives no basis for choosing between listing labels, listing filters, or managing labels, so the when-to-use decision is left entirely to inference.

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/taylorwilsdon/google_workspace_mcp'

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