Skip to main content
Glama

create_label

Create Gmail labels with optional nested hierarchy, automatically building any missing parent labels. Returns the new label ID for applying labels to messages and threads.

Instructions

Create a new Gmail label in one account. Nested labels use "/" in the name ("Work/Invoices"); any missing parent labels are created too, so the hierarchy shows up correctly in Gmail. Returns the new label id — use that id with label_messages/label_thread, and the display name in label: search queries.

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

Input Schema

NameRequiredDescriptionDefault
nameYesLabel name. Use "/" for nesting, e.g. "Work/Invoices".
accountYesAccount id ("personal", "tamu").
label_list_visibilityNoGmail labelListVisibility value (default: labelShow).labelShow
message_list_visibilityNoGmail messageListVisibility value (default: show).show

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare this is a non-read-only, non-destructive write, so the description carries real weight and does it: it discloses the side effect that missing parent labels are created automatically so the hierarchy renders correctly, and it discloses the return value (new label id). It stops short of covering duplicate-name behavior, failure modes, or whether creation is idempotent.

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?

Three sentences, front-loaded with the verb and resource, then the nesting caveat, then the return value and its consumers. No filler and no repetition of what the schema already says about defaults.

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?

A low-complexity creation tool with fully documented parameters and no output schema; the description compensates for the missing output schema by stating the return value and its intended use, and flags the parent-creation side effect. Only error/duplicate handling is left unaddressed, a minor gap for this tool class.

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, but the description adds meaning the schema does not: the "/" nesting convention implies parent labels may be absent and will be auto-created, and the account scoping is framed as one-account-at-a-time. It does not explain the two visibility parameters, which the schema already documents with defaults.

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 new Gmail label") plus scope ("in one account"), and the create/delete split in the sibling list makes the verb alone discriminating. The closing sentence also positions the result relative to label_messages/label_thread, so an agent can place the tool in the workflow without opening a schema.

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 downstream usage guidance: use the returned id with label_messages/label_thread, the display name in `label:` search queries. It does not state exclusions or when-not-to-use (e.g. duplicate names, use get_labels to inspect first), so it is strong context rather than a full routing rule.

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