Skip to main content
Glama

Delete a script config

automations_delete_script
DestructiveIdempotent

Permanently deletes a Home Assistant script by ID when confirmed, then reloads scripts.

Instructions

Delete a script by id, then reload scripts.

Without confirm=True returns a safety prompt; with confirm=True deletes /api/config/script/config/<id> and calls the script.reload service.

Returns: dict {"status": "deleted", "script_id", "result"}. Errors: returns {"error": "confirmation_required", "message": ..., "action": ...} when confirm is not True, or {"error": "not found", "script_id": sid} when no script has that id. Limits: requires confirm=True; deletion is immediate and permanent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNoMust be True to actually delete the script. False (default) returns a safety prompt instead of deleting anything.
script_idYesScript id to delete, bare (e.g. 'goodnight') or prefixed ('script.goodnight').

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.25.1
    • addedInput schema / properties / confirm / description
      Added value: +"Must be True to actually delete the script. False (default) returns a safety prompt instead of deleting anything."
    • addedInput schema / properties / script_id / description
      Added value: +"Script id to delete, bare (e.g. 'goodnight') or prefixed ('script.goodnight')."
  2. Changed1 schema field changedv0.18.1
    • addedInput schema / properties / confirm
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
  3. First observedv0.3.0

TDQS

A4.4/5.0
Behavior5/5

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

Despite annotations already flagging destructiveHint=true and idempotentHint=true, the description adds substantial context: deletion is immediate and permanent, the confirm gate semantics, the underlying endpoint and script.reload call, and the concrete error shapes for confirmation_required and not found.

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?

Front-loaded with the core action, then cleanly sectioned into Returns/Errors/Limits. Slightly verbose in restating the confirm behavior and the return dict, but every section carries usable information and nothing is 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 two-parameter destructive tool with an output schema, the description covers the confirmation flow, side effects, permanence, and error cases — nothing an agent needs to invoke it safely 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%, so the schema already documents both confirm (including its default and safety-prompt behavior) and script_id formats. The description restates the confirm requirement rather than adding syntax beyond the schema, so baseline 3 applies.

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 ('Delete a script by id') plus the side effect ('then reload scripts'), which cleanly separates it from siblings like automations_set_script_config, automations_run_script, and automations_delete_scene/automation.

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?

The confirm=True gate is explained thoroughly (safety prompt without it, real deletion with it), giving clear operational context. It stops short of naming sibling alternatives (e.g. delete_scene/delete_automation) or stating when a script should be deleted versus edited, so it's clear but not fully routing.

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