Skip to main content
Glama

Remove label from device

labels_remove_label_from_device
Idempotent

Remove a label from one Home Assistant device while keeping its other labels intact. Use it to untag a device from a label without deleting the label everywhere.

Instructions

Remove a label from a device, keeping its other labels.

Reads the device's current labels list from the device registry, drops label_id if present, and writes the remaining list back via WS config/device_registry/update.

Use when: untagging one device from a label without touching its other labels. Not for: deleting the label itself everywhere — use labels_delete_label. Returns: dict with device_id, the resulting labels list, the raw WS result, and ok. Errors: on a WS failure, returns {"device_id": ..., "label_id": ..., "ok": false, "error": "<message>"}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
label_idYesLabel registry ID to remove; obtain it from labels_list_labels.
device_idYesDevice registry ID to untag; obtain it from devices_list_devices.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.25.1
    • addedInput schema / properties / device_id / description
      Added value: +"Device registry ID to untag; obtain it from devices_list_devices."
    • addedInput schema / properties / label_id / description
      Added value: +"Label registry ID to remove; obtain it from labels_list_labels."
  2. First observedv0.3.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already indicate a non-read-only, idempotent, local mutation. The description adds substantial context beyond that: it explains the read-modify-write sequence, that `label_id` is dropped only if present, the underlying WS update call, the returned fields, and the exact error payload shape.

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?

The description is front-loaded with the action and sibling alternative, then structured into Use when, Not for, Returns, and Errors sections. Each section earns its place, especially the error contract, and there is no redundant filler.

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?

It covers the action, scope, when-to-use, exclusion, return shape, and error behavior. With annotations and an output schema also present, the description supplies everything an agent needs to invoke the tool correctly.

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%, and both parameters already document what to provide and where to obtain the IDs. The description adds no new parameter constraints, formats, or edge cases beyond the schema, so the baseline of 3 for fully covered parameters is appropriate.

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?

The description states a specific verb and resource: remove a label from a device while preserving its other labels. It explicitly distinguishes this action from deleting the label itself and names the sibling `labels_delete_label`, so an agent can identify it without opening schemas.

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

Usage Guidelines5/5

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

It provides an explicit 'Use when' condition and a 'Not for' exclusion with the correct alternative tool. The guidance is directly actionable for choosing between this tool and `labels_delete_label`.

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