Skip to main content
Glama
Home Assistant MCP Server

Home Assistant MCP Server

Official

Remove Automation

ha_config_remove_automation
DestructiveIdempotent

Permanently delete a Home Assistant automation by entity ID or config ID, including disabled automations, to remove obsolete or unwanted rules from your configuration.

Instructions

Delete a Home Assistant automation permanently.

A disabled automation is removed too. The returned automation_id is the resolved entity_id, falling back to the input.

EXAMPLES:

  • Delete automation: ha_config_remove_automation("automation.old_automation")

  • Delete by config id: ha_config_remove_automation("1712345678901")

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": {
      "entity_id": "<entity_id>"
    },
    "name": "ha_config_remove_automation"
  }
}

Input Schema

NameRequiredDescriptionDefault
waitNoWait for automation to be fully removed before returning.
entity_idYesThe automation's entity_id (e.g. 'automation.old_automation') or its config id

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv9.1.0
    • addedInput schema / properties / entity_id
      Added value: +{
      +  "description": "The automation's entity_id (e.g. 'automation.old_automation') or its config id",
      +  "type": "string"
      +}
    • removedInput schema / properties / identifier
      Removed value: -{
      -  "description": "Automation entity_id (e.g., 'automation.old_automation') or unique_id to delete",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "identifier"
      -]New value: +[
      +  "entity_id"
      +]
  2. Changed1 schema field changedv8.6.0
    • changedInput schema / properties / wait / description
      Previous value: -"Wait for automation to be fully removed before returning. Default: True."New value: +"Wait for automation to be fully removed before returning."
  3. First observedv7.14.2

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is covered. The description adds real value beyond them: disabled automations are also deleted, and the response returns the resolved entity_id with a documented fallback. The Claude Desktop timeout workaround is operational context but is client-specific noise rather than general behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The purpose and examples are front-loaded and tight, but the final Claude Desktop troubleshooting paragraph consumes roughly a third of the text and does nothing to help an agent select or correctly invoke this tool. It distracts from the core definition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema, full annotation coverage and 100% schema description coverage, almost all an agent needs is present, including the permanent-deletion and disabled-automation semantics. The only shortfall is the mismatched emphasis on a specific desktop client's timeout quirk rather than general failure handling.

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%, so both parameters are already documented, including the entity_id-or-config-id duality and the meaning of 'wait'. The description echoes the dual-id acceptance but adds no new syntax or format detail, making 3 the appropriate baseline.

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 opening sentence states a specific verb and resource ('Delete a Home Assistant automation permanently'), and the follow-up clarifies that disabled automations are also removed. An agent can distinguish this from ha_config_set_automation or 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 Guidelines4/5

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

Two concrete examples show the two accepted invocation styles (entity_id vs. config id), giving clear usage context. It stops short of naming when to prefer this over a generic sibling like ha_remove_entity, so no explicit exclusions are provided.

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