Skip to main content
Glama
homeassistant-ai

Home Assistant MCP Server

Official

Remove Helper or Integration

ha_remove_helpers_integrations
DestructiveIdempotent

Delete Home Assistant helper or integration config entries by helper type, entity ID, config entry ID, or subentry ID. Handles simple helper and flow-based deletions, removing all linked sub-entities.

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 with four routing paths driven by helper_type.

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.

SUPPORTED HELPER TYPES:

  • SIMPLE (12, websocket-delete): input_button, input_boolean, input_select, input_number, input_text, input_datetime, counter, timer, schedule, zone, person, tag.

  • FLOW (17, config-entry-delete via entity lookup): 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.

ROUTING:

  • SIMPLE helper_type + bare helper_id or entity_id → websocket delete.

  • FLOW helper_type + 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.

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

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

MISSING-TARGET CONTRACT: A target that is confirmed absent raises a structured error rather than returning silent success, so a typo'd or stale identifier surfaces immediately at the caller layer (the success boolean is what agent wrappers branch on). The error code per-path follows the target shape:

  • SIMPLE (bare helper_id or entity_id): state-machine empty AND entity registry empty → raises ENTITY_NOT_FOUND.

  • FLOW (entity_id): not in entity registry → raises ENTITY_NOT_FOUND. YAML-configured helpers (no config entry backing) raise RESOURCE_NOT_FOUND. A bare helper_id (no .) on a FLOW target raises ENTITY_NOT_FOUND — FLOW resolution needs a full entity_id. TOCTOU 404 on the resolved entry_id raises RESOURCE_NOT_FOUND.

  • Direct config entry (helper_type=None): backend returns HTTP 404 → raises RESOURCE_NOT_FOUND.

  • Config subentry: backend returns a "not_found" error → raises RESOURCE_NOT_FOUND.

Idempotency at the contract level still holds (call N times = same response). Transient connectivity failures (WebSocket disconnected, network timeouts) 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 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. Cannot be undone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
waitNoWait for entity removal. Default: True. Ignored when helper_type=None or helper_type='config_subentry' (no entity poll, require_restart returned).
targetYesWhat 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).
confirmNoMust be True to confirm removal.
helper_typeNoHelper 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.
subentry_idNoConfig subentry ID to remove when helper_type='config_subentry'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 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"
      +  }
      +]
  2. First observedv7.14.2

TDQS

A5/5.0
Behavior5/5

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

Annotations provide destructiveHint=true and idempotentHint=true, but the description goes far beyond: it details three backend mechanisms, routing paths, missing-target error codes, idempotency behavior, transient failure codes, and a warning about dependencies. This adds critical context beyond 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but every section earns its place: WHEN NOT TO USE, SUPPORTED HELPER TYPES, ROUTING, MISSING-TARGET CONTRACT, EXAMPLES, and WARNING. It is well-structured, front-loaded with a summary, and uses clear headings, making it easy to navigate despite its length.

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 tool's complexity (5 parameters, multiple routing paths, error handling) and the presence of an output schema, the description is exceptionally complete. It covers all use cases, error codes, examples, and risk warnings, leaving no gaps for an agent.

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

Parameters5/5

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

Although schema coverage is 100%, the description adds substantial meaning: it explains the four target shapes, the helper_type routing, the difference between helper_id and entity_id, and the config_subentry case. This goes well beyond the schema's property descriptions, enriching agent understanding.

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 clearly states the tool's purpose: 'Remove a Home Assistant helper or integration config entry.' It specifies the verb (remove) and resource (helper/integration config entry) and distinguishes from sibling tools like ha_remove_entity, which is explicitly mentioned in the WHEN NOT TO USE section.

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?

The description provides explicit WHEN NOT TO USE guidance naming alternatives (ha_remove_entity) and covers YAML-configured helpers. It also explains routing paths based on helper_type, giving clear criteria for when to use this tool vs others.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/homeassistant-ai/ha-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server