Skip to main content
Glama
homeassistant-ai

Home Assistant MCP Server

Official

Get Script Config

ha_config_get_script
Read-onlyIdempotent

Fetch a Home Assistant script's complete configuration—sequence, mode, fields, and settings—to inspect or modify its actions.

Instructions

Get Home Assistant script configuration.

Returns the complete configuration for a script, including sequence, mode, fields, and other settings.

The returned config_hash stays the same across consecutive reads of an unchanged config.

The returned script_id is the canonical bare storage key resolved by the REST client (matching what ha_config_set_script / ha_config_remove_script expect), falling back to the input identifier on the rare path where the REST envelope omits it. Prefix handling matches ha_config_get_automation in behavior (mechanism differs: automations resolve via state lookup; scripts strip the prefix).

EXAMPLES:

  • Get script (bare form): ha_config_get_script("morning_routine")

  • Get script (entity_id form): ha_config_get_script("script.morning_routine")

For detailed script configuration help, use ha_get_skill_guide.

read inspect fetch view existing script config sequence actions get show detail

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
script_idYesScript identifier — bare storage key ('morning_routine') or entity_id form ('script.morning_routine'); a leading 'script.' prefix is stripped before lookup.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv7.14.2

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered; the description adds genuinely new behavioral context beyond that — config_hash stability across consecutive reads and the canonical script_id resolution with its fallback path. No auth or rate-limit detail, so not a 5.

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?

Purpose and return contents are correctly front-loaded, but the REST-envelope fallback paragraph is deep internal detail and the trailing keyword dump ('read inspect fetch view existing script config sequence actions get show detail') is pure filler that dilutes an otherwise tight definition.

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?

With an output schema present, return-value documentation is not required, yet the description still explains the two notable return fields (config_hash, script_id) and their interpretation. For a read-only single-parameter tool, nothing an agent needs to call it correctly 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% (baseline 3), and the description goes further by documenting the remote-resolution semantics of script_id: it is the canonical bare storage key that set/remove expect, matching get_automation's prefix handling, with two worked examples of valid input forms.

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+resource ('Get Home Assistant script configuration') and immediately enumerates what the config contains (sequence, mode, fields). It is clearly separable from siblings ha_config_set_script / ha_config_remove_script, which it names and ties back to via the returned script_id.

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?

Provides clear context for when this is the right call (reading an existing script's full config) and routes the agent to an alternative for a related need ('For detailed script configuration help, use ha_get_skill_guide'). It does not state explicit when-not conditions or contrast against ha_config_get_automation beyond a parity note, so it stops short of a 5.

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