Skip to main content
Glama

Create label

labels_create_label

Create a Home Assistant label to tag entities or devices. Pass a name plus optional icon, color, or description; returns the created label ID and details.

Instructions

Create a new label.

Calls WS config/label_registry/create with name and any of icon, color and description you pass; Home Assistant assigns a new label_id, so calling this twice with the same name creates two separate labels.

Use when: you need a new label to tag entities or devices with. Returns: the created label registry dict (label_id, name, icon, color, description). Errors: on a WS failure, returns {"error": "<message>"} instead of raising.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
iconNoOptional mdi icon identifier, e.g. 'mdi:alert'; omit for no icon.
nameYesDisplay name for the new label, e.g. 'Battery Low'.
colorNoOptional label color name recognised by the frontend, e.g. 'red'; omit for no color.
descriptionNoOptional free-text description of the label's purpose; omit for none.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.25.1
    • addedInput schema / properties / color / description
      Added value: +"Optional label color name recognised by the frontend, e.g. 'red'; omit for no color."
    • addedInput schema / properties / description / description
      Added value: +"Optional free-text description of the label's purpose; omit for none."
    • addedInput schema / properties / icon / description
      Added value: +"Optional mdi icon identifier, e.g. 'mdi:alert'; omit for no icon."
    • addedInput schema / properties / name / description
      Added value: +"Display name for the new label, e.g. 'Battery Low'."
  2. First observedv0.3.0

TDQS

A4.4/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: it explains that Home Assistant assigns the label_id, that calling twice with the same name yields two distinct labels (concretely substantiating idempotentHint=false), and that WS failures return `{"error": ...}` instead of raising. This error contract and non-idempotency detail would be invisible to an agent otherwise.

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 one-line purpose, then organized into labeled Use/Returns/Errors blocks that are easy to scan. Slightly longer than strictly necessary given an output schema exists, but nearly every sentence carries usable information.

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?

Covers intent, the write path, duplication behavior, and error semantics for a 4-parameter mutation tool. With annotations and a present output schema already covering safety and return shape, nothing an agent needs to call this correctly is missing.

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 all four parameters (name, icon, color, description) are already fully documented in the schema. The description only restates that these fields are passed through to the WS call, adding no syntax or constraint detail beyond what the schema provides. Baseline 3 applies.

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 precise verb+resource ("Create a new label") and even names the underlying WS endpoint `config/label_registry/create`. An agent can distinguish it from siblings like labels_update_label, labels_create_category, and labels_assign_label_to_entity without opening any 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?

Explicitly states "Use when: you need a new label to tag entities or devices with," which gives clear intent context. It does not, however, name alternatives or exclusions (e.g., update if the label already exists, or create_category for a different resource), leaving routing to inference.

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