Skip to main content
Glama

Get a script's stored YAML config

automations_get_script_config
Read-onlyIdempotent

Fetch a Home Assistant script's stored YAML config by id, returning its alias, sequence, fields, and mode, or None when no script matches. Use it for configuration, not runtime state.

Instructions

Get a script's stored YAML config as a dict.

Requests /api/config/script/config/<id> over HTTP and returns the parsed JSON, or None on a 404.

Not for: the script's current runtime state — use automations_list_scripts or entities_get_entity for that. Returns: dict with the script's alias, sequence, fields and mode, or None when no script has that id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
script_idYesScript id to look up, bare (e.g. 'goodnight') or prefixed ('script.goodnight'); the 'script.' prefix is stripped if present.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.25.1
    • addedInput schema / properties / script_id / description
      Added value: +"Script id to look up, bare (e.g. 'goodnight') or prefixed ('script.goodnight'); the 'script.' prefix is stripped if present."
  2. First observedv0.3.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered. The description adds substantive context beyond annotations: the underlying HTTP endpoint, the 404-to-None behavior, and the exact return shape. It stops short of mentioning permission requirements or caching, but adds real behavioral value.

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 tight sentences, front-loaded with the core action, then the exclusion, then the return contract. Every sentence adds 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?

Covers the action, the sibling it is not, the transport endpoint, the 404 fallback, and the return shape. With an output schema present the description need not detail return values, yet it still names the top-level keys, making this more than sufficient for correct invocation.

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% and the schema already explains the bare/prefixed script_id handling thoroughly. The description adds no new parameter syntax but correctly identifies the return dict keys (alias, sequence, fields, mode), which indirectly signals what the id refers to. Baseline 3 applies when schema carries the load, but the explicit key mention is a small extra.

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 ('Get a script's stored YAML config as a dict') and names the exact sibling to avoid ('automations_list_scripts', 'entities_get_entity') for a different concern. An agent can distinguish this from automations_list_scripts without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Explicitly defines the boundary: 'Not for: the script's current runtime state — use automations_list_scripts or entities_get_entity for that.' This tells the agent when not to use this tool and which alternatives to pick.

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