Skip to main content
Glama
Home Assistant MCP Server

Home Assistant MCP Server

Official

Remove Group

ha_config_remove_group
DestructiveIdempotent

Remove old-style Home Assistant entity groups defined in YAML or created with ha_config_set_group; use this for service-based groups that config-entry deletion tools cannot find.

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 come back on group.reload or a 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.

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": {
      "object_id": "<object_id>"
    },
    "name": "ha_config_remove_group"
  }
}

Input Schema

NameRequiredDescriptionDefault
waitNoWait for group to be fully removed before returning.
object_idYesGroup identifier: a lowercase slug without the 'group.' prefix (e.g., 'living_room_lights')

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv9.0.0
    • changedInput schema / properties / object_id / description
      Previous value: -"Group identifier without 'group.' prefix (e.g., 'living_room_lights')"New value: +"Group identifier: a lowercase slug without the 'group.' prefix (e.g., 'living_room_lights')"
  2. 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."
  3. First observedv7.14.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, yet the description adds genuinely new consequences: automations referencing the group may fail, YAML-defined groups reappear after group.reload or restart, and platform-specific groups are out of scope. The Claude Desktop timeout paragraph adds real operational context but is client-specific and reads as noise relative to the core call contract.

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?

Purpose is front-loaded and the bold when/when-not/warning sections make scanning easy. The final Claude Desktop troubleshooting paragraph is three sentences of client-specific workaround that inflate the definition without helping tool selection.

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?

For a destructive, 2-parameter tool with an output schema and rich annotations, the description covers everything an agent needs: scope limits, side effects, reversibility caveats, and where to find valid IDs. The presence of an output schema means return values need not be explained.

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%, with object_id's slug format and the wait flag both fully documented in the schema. The description only reinforces object_id via the example ('living_room_lights') and never mentions `wait`, so it does not add meaning beyond the structured fields — baseline 3.

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 scopes it to old-style/YAML groups versus config-entry-backed ones. An agent can distinguish it from ha_remove_helpers_integrations and ha_config_set_group 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?

Explicitly provides both a 'When NOT to use' branch with the correct alternative tool and a 'When to use' branch describing which groups this tool can reach. It also names ha_config_list_groups for discovery and gives a concrete example call.

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