Skip to main content
Glama

Create label

create_label
Idempotent

Create a Gmail label or Outlook category in a connected mailbox; returns an existing one unchanged and supports nested Gmail labels via paths like Projects/2026.

Instructions

Create a Gmail label or an Outlook category in a mailbox. If the mailbox already has one with that name, it is returned unchanged. In Gmail, a name such as Projects/2026 creates a nested label and any missing parent labels, and the label also works as a folder. Gmail refuses names it uses for system labels and folders, such as Inbox, Archive and Starred. A new Outlook category has no color. IMAP mailboxes don't have labels.

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": "create_label"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesLabel or category name. For a nested Gmail label, give the full path, such as Projects/2026.
accountIdNoAccount to operate on. Optional when exactly one account is connected.

Output Schema

NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.31.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare non-read-only, non-destructive, idempotent behavior, and the description reinforces this with the concrete 'returned unchanged' semantics. It adds genuinely new behavior beyond the annotations: automatic creation of missing parent labels, the Projects/2026 nesting syntax, rejection of system label names like Inbox/Archive/Starred, and that new Outlook categories carry no color.

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?

Five short sentences, front-loaded with the core action and then the edge cases in descending order of importance. No filler or restated field definitions.

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 an output schema present, return values need not be described; the description supplies exactly the platform-divergence and failure-mode context an agent needs to invoke this correctly, including what to expect when the label already exists.

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 already documents both parameters and the baseline is 3. The description still adds meaning the schema lacks by explaining the path syntax and its nesting side effect, plus which names will be refused.

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 — creating a Gmail label or Outlook category — and immediately bounds scope by noting IMAP mailboxes have no labels, which separates it from folder/draft/label-management siblings.

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 a clear when-not (IMAP mailboxes) and describes the idempotent case where an existing name is reused rather than duplicated, plus the implied folder usage in Gmail. It does not explicitly point to create_folder or rename_folder as alternatives for folder-oriented tasks, so an agent must infer that routing.

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