Skip to main content
Glama
Home Assistant MCP Server

Home Assistant MCP Server

Official

Remove Helper or Integration

ha_remove_helpers_integrations
DestructiveIdempotent

Remove Home Assistant helpers, integration config entries, or config subentries by entity ID, helper ID, or entry ID; the tool selects the correct deletion path for the target.

Instructions

Remove a Home Assistant helper or integration config entry.

Unifies three backend removal mechanisms — simple-helper websocket delete, config-entry delete, and config-subentry delete — behind one entry point; helper_type picks the path, or the entity registry does when an entity_id comes without one.

WHEN NOT TO USE:

  • Removing only an entity (without deleting its underlying helper or config entry) — use ha_remove_entity instead.

  • YAML-configured helpers — they have no storage backend. Edit the YAML file and reload the relevant integration.

  • ha-mcp's own ha_mcp_tools entries are refused: manage them in the HA UI, or (server settings, developer mode on) ha_dev_manage_settings / ha_dev_manage_server.

ROUTING:

  • SIMPLE helper_type (input_button, input_boolean, input_select, input_number, input_text, input_datetime, counter, timer, schedule, zone, person, tag) + bare helper_id (its storage id) or entity_id → websocket delete.

  • FLOW helper_type (any helper flow Home Assistant lists: template, group, utility_meter, derivative, ...; custom helper integrations too)

    • full entity_id → resolve entity_id to config_entry_id via entity_registry, then delete the config entry. All sub-entities (e.g. utility_meter tariffs) are removed together. An entity registered by another integration is refused with VALIDATION_INVALID_PARAMETER and nothing is deleted.

  • helper_type=None + entity_id → the entity's registry entry names its helper (storage type or helper flow); an entity of any other integration is refused with VALIDATION_INVALID_PARAMETER.

  • helper_type=None + entry_id → direct config entry delete (any integration).

  • helper_type="config_subentry" + parent entry_id + subentry_id → delete one config subentry.

A target that cannot be removed raises a structured error rather than returning silent success: ENTITY_NOT_FOUND when the entity_id is absent from both the state machine and the entity registry, or for a bare helper_id no stored helper has (a bare helper_id on a FLOW target also raises it — FLOW resolution needs a full entity_id); RESOURCE_NOT_FOUND when it exists but is not storage- or registry-managed (a YAML-configured helper, or an entity with a state but no registry entry), for a config entry the backend reports as 404, or for a missing config subentry. Calling N times gives the same response. Transient connectivity failures raise their own codes (WEBSOCKET_DISCONNECTED, CONNECTION_FAILED) so retry logic can branch separately.

EXAMPLES:

  • Remove SIMPLE button: ha_remove_helpers_integrations(target="my_button", helper_type="input_button", confirm=True)

  • Remove FLOW utility_meter (any sub-entity works): ha_remove_helpers_integrations(target="sensor.energy_peak", helper_type="utility_meter", confirm=True)

  • Remove whatever helper owns an entity: ha_remove_helpers_integrations(target="sensor.energy_peak", confirm=True)

  • Remove any integration by entry_id: ha_remove_helpers_integrations(target="01HXYZ...", confirm=True)

  • Remove a config subentry: ha_remove_helpers_integrations(target="01HXYZ...", helper_type="config_subentry", subentry_id="subentry-123", confirm=True)

WARNING: Removing a helper or integration that is referenced by automations, scripts, or other integrations may cause those to fail. Use ha_search() / ha_get_integration() to verify before removal. ha_manage_backup(scope="edits", action="restore") recreates removed FLOW helpers whose options could be snapshotted, and config subentries. It cannot recreate custom helper integrations (their options are withheld) or otp (no stored options); re-add those yourself, otp through the user in the HA UI.

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": {
      "target": "<target>"
    },
    "name": "ha_remove_helpers_integrations"
  }
}

Input Schema

NameRequiredDescriptionDefault
waitNoWait for entity removal. Default: True. Ignored for a direct config entry delete (an entry_id target) or helper_type='config_subentry' (no entity poll, require_restart returned).
targetYesWhat to remove. One of: (a) bare helper_id for SIMPLE helpers: the helper's storage id, not the name of its entity, e.g. 'my_button'; (b) full entity_id, e.g. 'input_button.my_button' or 'sensor.my_meter'; (c) config entry_id for any integration, with helper_type omitted, e.g. value from ha_get_integration(); (d) parent config entry_id for a config subentry.
confirmNoMust be True to confirm removal.
helper_typeNoHelper type of target; ROUTING says which value takes which removal path.
subentry_idNoConfig subentry ID to remove when helper_type='config_subentry'.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv9.0.0
    • changedInput schema / properties / target / description
      Previous value: -"What to remove. One of: (a) bare helper_id for SIMPLE helpers, e.g. 'my_button'; (b) full entity_id, e.g. 'input_button.my_button' or 'sensor.my_meter'; (c) config entry_id for any integration, with helper_type omitted, e.g. value from ha_get_integration(); (d) parent config entry_id for a config subentry."New value: +"What to remove. One of: (a) bare helper_id for SIMPLE helpers: the helper's storage id, not the name of its entity, e.g. 'my_button'; (b) full entity_id, e.g. 'input_button.my_button' or 'sensor.my_meter'; (c) config entry_id for any integration, with helper_type omitted, e.g. value from ha_get_integration(); (d) parent config entry_id for a config subentry."
  2. Changed4 schema fields changedv8.7.0
    • changedInput schema / properties / helper_type / anyOf
      Previous value: -[
      -  {
      -    "enum": [
      -      "input_button",
      -      "input_boolean",
      -      "input_select",
      -      "input_number",
      -      "input_text",
      -      "input_datetime",
      -      "counter",
      -      "timer",
      -      "schedule",
      -      "zone",
      -      "person",
      -      "tag",
      -      "config_subentry",
      -      "template",
      -      "group",
      -      "utility_meter",
      -      "derivative",
      -      "min_max",
      -      "threshold",
      -      "integration",
      -      "statistics",
      -      "trend",
      -      "random",
      -      "filter",
      -      "tod",
      -      "generic_thermostat",
      -      "switch_as_x",
      -      "generic_hygrostat",
      -      "history_stats",
      -      "mold_indicator"
      -    ],
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "input_button",
      +      "input_boolean",
      +      "input_select",
      +      "input_number",
      +      "input_text",
      +      "input_datetime",
      +      "counter",
      +      "timer",
      +      "schedule",
      +      "zone",
      +      "person",
      +      "tag"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "const": "config_subentry",
      +    "type": "string"
      +  },
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / helper_type / description
      Previous value: -"Helper type. Required when target is a helper_id (bare) or entity_id. Set to None when target is a config entry_id to remove any integration. Use 'config_subentry' to remove a config subentry under target."New value: +"Helper type of target; ROUTING says which value takes which removal path."
    • changedInput schema / properties / target / description
      Previous value: -"What to remove. One of: (a) bare helper_id for SIMPLE helpers, e.g. 'my_button'; (b) full entity_id, e.g. 'input_button.my_button' or 'sensor.my_meter'; (c) config entry_id for any integration, e.g. value from ha_get_integration(); (d) parent config entry_id for a config subentry."New value: +"What to remove. One of: (a) bare helper_id for SIMPLE helpers, e.g. 'my_button'; (b) full entity_id, e.g. 'input_button.my_button' or 'sensor.my_meter'; (c) config entry_id for any integration, with helper_type omitted, e.g. value from ha_get_integration(); (d) parent config entry_id for a config subentry."
    • changedInput schema / properties / wait / description
      Previous value: -"Wait for entity removal. Default: True. Ignored when helper_type=None or helper_type='config_subentry' (no entity poll, require_restart returned)."New value: +"Wait for entity removal. Default: True. Ignored for a direct config entry delete (an entry_id target) or helper_type='config_subentry' (no entity poll, require_restart returned)."
  3. Changed1 schema field changedv8.6.0
    • changedInput schema / properties / target / description
      Previous value: -"What to remove. One of: (a) bare helper_id for SIMPLE helpers (requires helper_type), e.g. 'my_button'; (b) full entity_id (requires helper_type), e.g. 'input_button.my_button' or 'sensor.my_meter'; (c) config entry_id for any integration (helper_type=None), e.g. value from ha_get_integration(); (d) parent config entry_id for config_subentry (requires helper_type='config_subentry' and subentry_id)."New value: +"What to remove. One of: (a) bare helper_id for SIMPLE helpers, e.g. 'my_button'; (b) full entity_id, e.g. 'input_button.my_button' or 'sensor.my_meter'; (c) config entry_id for any integration, e.g. value from ha_get_integration(); (d) parent config entry_id for a config subentry."
  4. Changed1 schema field changedv8.3.0
    • changedInput schema / properties / helper_type / anyOf
      Previous value: -[
      -  {
      -    "enum": [
      -      "input_button",
      -      "input_boolean",
      -      "input_select",
      -      "input_number",
      -      "input_text",
      -      "input_datetime",
      -      "counter",
      -      "timer",
      -      "schedule",
      -      "zone",
      -      "person",
      -      "tag",
      -      "config_subentry",
      -      "template",
      -      "group",
      -      "utility_meter",
      -      "derivative",
      -      "min_max",
      -      "threshold",
      -      "integration",
      -      "statistics",
      -      "trend",
      -      "random",
      -      "filter",
      -      "tod",
      -      "generic_thermostat",
      -      "switch_as_x",
      -      "generic_hygrostat"
      -    ],
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "input_button",
      +      "input_boolean",
      +      "input_select",
      +      "input_number",
      +      "input_text",
      +      "input_datetime",
      +      "counter",
      +      "timer",
      +      "schedule",
      +      "zone",
      +      "person",
      +      "tag",
      +      "config_subentry",
      +      "template",
      +      "group",
      +      "utility_meter",
      +      "derivative",
      +      "min_max",
      +      "threshold",
      +      "integration",
      +      "statistics",
      +      "trend",
      +      "random",
      +      "filter",
      +      "tod",
      +      "generic_thermostat",
      +      "switch_as_x",
      +      "generic_hygrostat",
      +      "history_stats",
      +      "mold_indicator"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  5. First observedv7.14.2

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, and the description adds substantial context: structured error codes, refusal cases, side effects on referenced automations, backup/restore limitations, and retry guidance. Nothing contradicts the annotations.

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 description is long but well structured with WHEN NOT TO USE, ROUTING, EXAMPLES, and WARNING headings, and it is front-loaded with the core action. The Claude Desktop timeout workaround is useful but makes the definition unusually long for a tool description.

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?

Given the destructive operation, rich annotations, complete schema, and output schema, the description covers routing, error behavior, side effects, and recovery limits thoroughly. An agent has enough information to choose and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, but the ROUTING section adds valuable combination semantics for target plus helper_type, including entity_id, entry_id, and subentry_id cases. It does not add much about the wait parameter beyond the schema, so it falls just short of 5.

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 Home Assistant helper or integration config entry. It clearly distinguishes this from the sibling ha_remove_entity and explains the multiple removal paths it unifies.

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?

Has an explicit WHEN NOT TO USE section naming alternatives such as ha_remove_entity, YAML editing, and ha_dev_manage_settings. The ROUTING section maps parameter combinations to specific backend mechanisms, leaving little 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