Skip to main content
Glama
Vortitron

home-assistant-mcp

by Vortitron

Delete script

ha_delete_script
Destructive

Delete a Home Assistant script by its id. First remove any automations that call it, since those steps will fail once the script is gone. Requires write access to be enabled.

Instructions

Delete a script by id. Automations that call it will fail at that step, so remove those calls first. Requires HA_ALLOW_WRITE=true and HA_ALLOW_CONFIG_WRITE=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
script_idYesScript id: the key in scripts.yaml and the object id of script.<id>, e.g. 'raise_heat'. 'script.raise_heat' also works.
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.3/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, yet the description goes further and discloses the downstream consequence (dependent automations will fail at that step) plus the two environment flags required for the call to succeed. That is exactly the kind of context annotations cannot carry.

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?

Three short sentences, zero filler, with the action first, the hazard second, and the prerequisites last. Every sentence earns its place.

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 mutation with full annotations, complete schema coverage, and no output schema, the description supplies the two things that matter: the blast radius on dependent automations and the required write flags. Nothing an agent needs before calling it is missing.

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%, including a detailed script_id description and the optional instance_id scoping semantics, so the schema does the heavy lifting. The description adds only 'by id' and nothing about the instance_id guard, meriting the baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Delete a script by id'), which cleanly separates it from siblings like ha_delete_automation and ha_delete_dashboard. It does not explicitly name a sibling or call out what it is not, so it falls just short of the top score.

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?

Gives concrete preconditions ('Requires HA_ALLOW_WRITE=true and HA_ALLOW_CONFIG_WRITE=true') and a when-not-to-call-this-yet warning ('remove those calls first'). It stops short of pointing to an alternative tool for fixing the dependent automations, so it is clear context rather than full routing guidance.

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