Skip to main content
Glama

Get an automation's stored config

automations_get_automation_config
Read-onlyIdempotent

Fetch the stored configuration of a Home Assistant automation by its config ID, returning triggers, conditions, actions, and mode as a dictionary.

Instructions

Get the stored config of one automation (automations.yaml) as a dict.

Requests /api/config/automation/config/<id> over HTTP and returns the parsed JSON, or None on a 404 — including for automations defined in packages/YAML without an id, since those have no config-id route.

Not for: the automation's current runtime state — use automations_list_automations or entities_get_entity for that. Returns: dict with id, alias, trigger/triggers, condition/conditions, action/actions and mode, or None when no automation has that config id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
automation_idYesAutomation config id — the entity's `id` attribute, e.g. '1733294456585' — not its entity_id. A leading 'automation.' is stripped, but the rest must still be the config id (read it from `entities_get_entity(entity_id)` -> attributes.id), which differs from the entity's object_id for UI-created automations.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.25.1
    • addedInput schema / properties / automation_id / description
      Added value: +"Automation config id — the entity's `id` attribute, e.g. '1733294456585' — not its entity_id. A leading 'automation.' is stripped, but the rest must still be the config id (read it from `entities_get_entity(entity_id)` -> attributes.id), which differs from the entity's object_id for UI-created automations."
  2. First observedv0.3.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), yet the description adds genuine behavior: it hits a specific HTTP route and returns None on 404, including for package/YAML automations that lack a config-id route. That edge-case disclosure is high-value context an agent could not infer from annotations.

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-loads the purpose, then the mechanism, then the exclusion, then the return shape. Every sentence carries signal, though the HTTP endpoint path detail is slightly more than needed for selection.

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?

Despite an output schema existing, the description supplies the critical None/404 behavior and the packages-without-id caveat that the output schema would not convey. Combined with named alternatives, nothing needed 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.

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 fully documents automation_id (config id vs entity_id, leading prefix stripping). The description adds no syntax beyond the schema, so the 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 ('get the stored config of one automation') and even names the backing file (automations.yaml), distinguishing it from the many sibling automations_* tools.

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 declares what it is NOT for ('the automation's current runtime state') and routes the agent to two named alternatives, automations_list_automations and entities_get_entity. The condition selecting this tool is unambiguous.

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