Skip to main content
Glama
homeassistant-ai

Home Assistant MCP Server

Official

Remove Device

ha_remove_device
DestructiveIdempotent

Remove an orphaned device from Home Assistant registry when its integration supports removal. Use only for disconnected devices; active devices may be re-added.

Instructions

Remove an orphaned device from the Home Assistant device registry.

WARNING: This removes the device entry from the registry.

  • Use only for orphaned devices that are no longer connected

  • Active devices will typically be re-added by their integration

  • Associated entities may also be removed

Works only when the integration supports removing devices.

EXAMPLES:

  • Remove orphaned device: ha_remove_device("abc123def456")

NOTE: For most use cases, consider disabling the device instead: ha_set_device(device_id="abc123", disabled_by="user")

If a Claude Desktop user gets a 4-minute timeout with no result on this call, read the target back before repeating it, and tell them to wait a few seconds before clicking the manual-approve button, as clicking it too quickly is known to cause hangs in Claude Desktop. This workaround is specific to Claude Desktop.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_idYesDevice ID to remove from the registry

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv7.14.2

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, but the description adds context the annotations cannot: associated entities may be removed as a side effect, active devices are typically re-added by their integration, and integration support is a prerequisite. It also documents a known call-hang scenario, which is behavioral detail well beyond the structured fields.

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?

The warning, usage rules, example, and alternative are front-loaded and each earns its place. The closing Claude Desktop timeout paragraph is disproportionately long and environment-specific, adding bulk that is irrelevant to most callers, which keeps this below a 5.

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?

An output schema exists, so return values need not be explained. The description covers side effects, prerequisites, alternatives, and a known failure mode — everything an agent needs to decide whether and how to invoke a destructive registry operation.

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 coverage is 100% and the single parameter already carries a description ('Device ID to remove from the registry'), so the schema does the heavy lifting. The description adds only a sample invocation with a placeholder id, which confirms format but adds little semantic meaning. 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 specific verb and resource ('Remove an orphaned device from the Home Assistant device registry') and scopes it to orphaned devices rather than any device. It also names the sibling alternative ha_set_device, so an agent can distinguish delete-from-registry from disable without inspecting either schema.

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?

Gives explicit when-to-use ('only for orphaned devices that are no longer connected'), when-not-to-use, and a concrete alternative with the exact call: ha_set_device(device_id=..., disabled_by="user"). It also states a hard precondition ('Works only when the integration supports removing devices'), which is exactly the kind of routing guidance that prevents misuse.

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