Skip to main content
Glama
homeassistant-ai

Home Assistant MCP Server

Official

Remove Group

ha_config_remove_group
DestructiveIdempotent

Removes old-style service-based Home Assistant groups defined in YAML or via set_group. Not for config-entry-backed groups.

Instructions

Remove a service-based Home Assistant entity group via the group.remove service.

When NOT to use: for groups created through ha_config_set_helper(helper_type="group", ...), use ha_remove_helpers_integrations. Those config-entry-backed groups are not reachable via the group.remove service.

When to use: removing groups created with ha_config_set_group or defined in YAML via group: configuration. Config-entry-backed deletion tools cannot find these.

EXAMPLES:

  • Remove group: ha_config_remove_group("living_room_lights")

Use ha_config_list_groups() to find existing groups.

WARNING:

  • Removing a group used in automations may cause those automations to fail.

  • Groups defined in YAML can be removed at runtime but will reappear after restart.

  • This only removes old-style groups, not platform-specific groups.

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
waitNoWait for group to be fully removed before returning.
object_idYesGroup identifier without 'group.' prefix (e.g., 'living_room_lights')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv8.6.0
    • changedInput schema / properties / wait / description
      Previous value: -"Wait for group to be fully removed before returning. Default: True."New value: +"Wait for group to be fully removed before returning."
  2. 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 only declare destructive/idempotent/readOnly state; the description adds consequences the agent could not infer: automations referencing the group may break, YAML-defined groups reappear after restart, and platform-specific groups are out of scope. It also documents an operational failure mode (Claude Desktop 4-minute hang and the read-back-before-repeat mitigation), which is meaningful behavioral context 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?

Bold headers and front-loaded purpose make it scannable, and the routing guidance is prioritized correctly. The Claude Desktop workaround paragraph is three sentences of client-specific advice that dilutes an otherwise tight definition, which keeps it out of 5 territory.

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 explained, and the description covers scope limits, persistence behavior, side effects, discovery tooling, and environment-specific failure handling. Nothing needed to invoke 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% and the schema already documents both object_id (with the 'group.' prefix caveat) and the wait flag, so the baseline is 3. The description only reinforces object_id via an example call and adds nothing about the wait parameter or removal timing semantics.

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 a service-based Home Assistant entity group via the group.remove service') and immediately separates itself from the config-entry-backed siblings it must not be confused with. An agent can distinguish it from ha_remove_helpers_integrations, ha_config_set_group, and ha_remove_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 Guidelines5/5

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

Contains explicit 'When to use' and 'When NOT to use' sections naming the alternative tool (ha_remove_helpers_integrations) and the exact condition that selects it (helper_type="group" groups). It also points to ha_config_list_groups() for discovery, so both the routing decision and the prerequisite lookup are spelled out.

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