Skip to main content
Glama

gmail.users.labels.create

Creates a Gmail label to organize messages and threads, accepting a Label object with name, color, and visibility settings. Use it to add a new label to a user's mailbox.

Instructions

Creates a label. For more information, see Manage labels [HTTP POST] — creates or triggers a change; refused under --readonly safety profiles. Returns the API's response resource as JSON — request body is a JSON Label object accepting color, id, labelListVisibility, messageListVisibility, messagesTotal, messagesUnread, name, threadsTotal and 2 more fields; pass it via params or whole via body_file Siblings over the same resource: delete, get, list, patch, update.

Input Schema

NameRequiredDescriptionDefault
queryNoExtra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe.
paramsNoParameter map merged into the request; typed parameters win.
userIdYes[URL path segment] The user's email address. The special value `me` can be used to indicate the authenticated user.me
dry_runNoReturn the request that would be sent, without sending it.
body_fileNoRead the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON Label object.
request_bodyNoRequest body of type Label: pass it via `params` (merged into the built body) or whole via `body_file`.

Output Schema

NameRequiredDescriptionDefault
idNo
nameNo
typeNo
colorNo
threadsTotalNo
messagesTotalNo
threadsUnreadNo
messagesUnreadNo
labelListVisibilityNo
messageListVisibilityNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / body_file / description
      Previous value: -"Read the request body from this file ('-' for stdin) instead of building one from the parameters."New value: +"Read the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON Label object."
    • addedInput schema / properties / request_body
      Added value: +{
      +  "description": "Request body of type Label: pass it via `params` (merged into the built body) or whole via `body_file`.",
      +  "properties": {
      +    "color": {
      +      "properties": {
      +        "backgroundColor": {
      +          "type": "string"
      +        },
      +        "textColor": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "id": {
      +      "type": "string"
      +    },
      +    "labelListVisibility": {
      +      "enum": [
      +        "labelShow",
      +        "labelShowIfUnread",
      +        "labelHide"
      +      ],
      +      "type": "string"
      +    },
      +    "messageListVisibility": {
      +      "enum": [
      +        "show",
      +        "hide"
      +      ],
      +      "type": "string"
      +    },
      +    "messagesTotal": {
      +      "type": "integer"
      +    },
      +    "messagesUnread": {
      +      "type": "integer"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "threadsTotal": {
      +      "type": "integer"
      +    },
      +    "threadsUnread": {
      +      "type": "integer"
      +    },
      +    "type": {
      +      "enum": [
      +        "system",
      +        "user"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / userId / default
      Added value: +"me"
    • changedInput schema / properties / userId / description
      Previous value: -"The user's email address. The special value `me` can be used to indicate the authenticated user."New value: +"[URL path segment] The user's email address. The special value `me` can be used to indicate the authenticated user."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "color": {
      +      "properties": {
      +        "backgroundColor": {
      +          "type": "string"
      +        },
      +        "textColor": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "id": {
      +      "type": "string"
      +    },
      +    "labelListVisibility": {
      +      "enum": [
      +        "labelShow",
      +        "labelShowIfUnread",
      +        "labelHide"
      +      ],
      +      "type": "string"
      +    },
      +    "messageListVisibility": {
      +      "enum": [
      +        "show",
      +        "hide"
      +      ],
      +      "type": "string"
      +    },
      +    "messagesTotal": {
      +      "type": "integer"
      +    },
      +    "messagesUnread": {
      +      "type": "integer"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "threadsTotal": {
      +      "type": "integer"
      +    },
      +    "threadsUnread": {
      +      "type": "integer"
      +    },
      +    "type": {
      +      "enum": [
      +        "system",
      +        "user"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does a reasonable job: it discloses the HTTP method (POST), that it mutates state ("creates or triggers a change"), that it is blocked under --readonly profiles, and that the response is the API resource as JSON. It omits permission/scope requirements and whether a duplicate label name errors, which keeps it below 5.

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?

Front-loaded with the verb+resource, then safety, then body mechanics, then siblings — a sound ordering with no filler sentences. It is dense and slightly repetitive (the params/body_file instruction appears near-verbatim twice), which is the only drag.

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?

An output schema exists, so return values need not be explained, and the description still notes the JSON resource response. Combined with mutation/safety disclosure and body-construction options, an agent has enough to invoke it correctly; only auth/scope and duplicate-name behavior are unaddressed.

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?

Schema coverage is 100%, so the schema baseline is 3; the description goes beyond it by enumerating accepted Label fields (color, id, labelListVisibility, messageListVisibility, name, etc.) and explaining the two body paths — merged via `params` or whole via `body_file`. The repeated pass-via instructions duplicate the schema text, but the routing guidance between params and body_file adds genuine value.

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?

States a concrete verb and resource ("Creates a label") and explicitly names the sibling set (delete, get, list, patch, update) over the same resource, so the agent can place it in the CRUD family. It stops short of saying how creating differs from patch/update in outcome, so it is clear but not fully differentiating.

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

Usage Guidelines3/5

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

Siblings are listed, which implies the create-vs-patch-vs-update choice, but no condition is given for when to pick one over the other. The only real usage cue is the safety-profile note ("refused under --readonly safety profiles"), which is useful but is a guardrail rather than a when-to-use rule.

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