Skip to main content
Glama
Vortitron

home-assistant-mcp

by Vortitron

Delete a config entry (integration)

ha_delete_config_entry
Destructive

Permanently delete a Home Assistant config entry by ID to remove orphaned or duplicate integration instances that cause entity IDs to gain '_2' suffixes. Get the ID from ha_list_config_entries.

Instructions

Permanently delete one config entry (integration instance) by id. This is the fix for orphaned or duplicate entries — the kind left behind when a device's original config entry never got cleaned up, so a re-added device's entities pick up a '_2' (or higher) suffix because the old entry is still holding the original entity_id. Get entry_id from ha_list_config_entries; match on name/domain/state to find the stale one before deleting.

There was previously no way to do this outside the Settings → Devices & services UI. Requires ha:config. The response's require_restart says whether Home Assistant needs a restart to fully drop the entry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entry_idYesConfig entry id, from ha_list_config_entries.
instance_idNoOptional: the instance you mean (as listed by vomehome_list_instances). When given, the call is refused if this session is targeting a different home, instead of answering from it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations flag the write/destructive profile, but the description adds genuinely new context: the deletion is permanent, it requires the ha:config scope, it was previously impossible outside the UI, and the response's require_restart signals whether a restart is needed. These go meaningfully beyond destructiveHint/readOnlyHint/openWorldHint.

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?

Front-loaded with the core action in the first sentence, followed by the motivating scenario, the prerequisite lookup, and the auth/return notes. Every sentence contributes actionable information with no filler.

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 tool with full annotations and 100% schema coverage but no output schema, the description covers target acquisition, auth requirements, irreversibility, and the one response field of interest (require_restart). Nothing an agent needs to call it safely is missing.

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 coverage is 100%, so baseline is 3; the description adds value by telling the agent where entry_id comes from and how to identify the correct stale entry (match on name/domain/state). The instance_id guard semantics are left to the schema, but the entry_id guidance is a useful addition.

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 ('Permanently delete one config entry (integration instance) by id') and distinguishes itself from siblings like ha_remove_entity and ha_delete_automation. The orphaned/duplicate-entry scenario sharpens exactly what is being deleted.

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?

Explains clearly when to use it (orphaned or duplicate entries causing a '_2' entity_id suffix) and routes the agent to ha_list_config_entries with matching criteria (name/domain/state). It lacks an explicit 'when not to use' or a named alternative for the entity-vs-config-entry distinction, so it falls just short of the top tier.

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