Skip to main content
Glama

Create Gmail label

google_gmail_label_create

Create a Gmail label by name, optionally nest it under another label, set palette colors, and get the new label ID for organizing mail.

Instructions

Create a label in the account's Gmail, named name (1 to 225 characters, no space at either end; / nests it under another label, as Gmail does: Work/Invoices). A name already used by a label, ignoring case, is refused. text_color and background_color set its colors, both or neither, each a #rrggbb from Gmail's fixed palette (a refusal lists it); show_in_list and show_in_messages say whether it shows in the label list and on messages. Each call makes a new label; put it on mail with google_gmail_label. Returns the new label_id and its name. account is needed when several accounts are set up.

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

Input Schema

NameRequiredDescriptionDefault
nameYesThe new label's name, 1 to 225 characters with no space at either end; `/` nests it under another label, as Gmail does (`Work/Invoices`).
accountNoThe account's label. Left out, the only account is used; with several accounts, the call fails and lists them.
text_colorNoThe label's text color as `#rrggbb`, from Gmail's palette; given together with `background_color`.
show_in_listNoWhether the label shows in the label list (default: Gmail's own default, shown).
background_colorNoThe label's background color as `#rrggbb`, from Gmail's palette; given together with `text_color`.
show_in_messagesNoWhether the label shows on messages in the message list (default: Gmail's own default, shown).

Output Schema

NameRequiredDescriptionDefault
nameYesThe label's name as Google reports it.
label_idYesThe new label's id, which the label tools take.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, idempotentHint=false, destructiveHint=false), the description discloses that every call produces a new label, that case-insensitive name collisions are refused, that colors must be supplied as a pair from a fixed palette, and that a refusal enumerates that palette. This is meaningful behavioral detail not present in the structured fields, though it doesn't say what an actual failure response looks like.

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?

A single dense paragraph that front-loads the action and naming rule, then works through colors, visibility, and account selection in the order an agent would need them. Every clause carries information; parentheticals are used instead of padding sentences.

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

Completeness5/5

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

With six parameters, full schema coverage, an output schema, and annotations present, the description covers the remaining gaps an agent needs: uniqueness refusal, nesting semantics, the color pairing constraint, and multi-account disambiguation. Nothing material for correct invocation is missing.

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 baseline is 3; the description still adds value by stating the cross-parameter rule that colors must be given 'both or neither' and by explaining the case-insensitive uniqueness constraint on `name`, which the schema does not express. It largely mirrors the schema wording for `show_in_list`/`show_in_messages`, keeping it from a 5.

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 ('Create a label in the account's Gmail') and immediately scopes it with the naming rules. It also distinguishes itself from the sibling `google_gmail_label` by noting that this tool only creates the label and that applying it to mail is a separate call.

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?

Gives clear routing guidance: 'Each call makes a new label; put it on mail with `google_gmail_label`', plus the condition for supplying `account` when several accounts exist. It lacks an explicit statement of when *not* to create a label (e.g. reuse an existing one), but the practical alternatives are covered.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.