Skip to main content
Glama
Home Assistant MCP Server

Home Assistant MCP Server

Official

Get Automation Config

ha_config_get_automation
Read-onlyIdempotent

Fetch an existing Home Assistant automation's stored configuration, validation status, and referenced entities/devices by entity_id or config ID.

Instructions

Get a Home Assistant automation's stored configuration.

config is the body Home Assistant stores, as it stores it; its config_hash stays the same across reads of an unchanged automation. entity is the automation's entity registry row, validation holds Home Assistant's status and error when the automation failed to load (None when it loaded), and references lists the entities, devices, areas, floors, labels and blueprint it uses. references is None without the ha_mcp_tools component's automation_config bridge and while Home Assistant has not loaded the automation (disabled, or it failed to load); warnings says which. Without the bridge, related holds Home Assistant's Related set for the automation instead, keyed by item type: what it uses plus their devices, areas, floors and integrations. automation_id is the resolved entity_id, falling back to the input.

EXAMPLES:

  • Get automation: ha_config_get_automation("automation.morning_routine")

  • Get by config id: ha_config_get_automation("1712345678901")

For comprehensive automation documentation, use ha_get_skill_guide.

read inspect fetch view existing automation config triggers conditions actions get show detail

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "entity_id": "<entity_id>"
    },
    "name": "ha_config_get_automation"
  }
}

Input Schema

NameRequiredDescriptionDefault
entity_idYesThe automation's entity_id (e.g. 'automation.morning_routine') or its config id

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv9.1.0
    • addedInput schema / properties / entity_id
      Added value: +{
      +  "description": "The automation's entity_id (e.g. 'automation.morning_routine') or its config id",
      +  "type": "string"
      +}
    • removedInput schema / properties / identifier
      Removed value: -{
      -  "description": "Automation entity_id (e.g., 'automation.morning_routine') or unique_id",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "identifier"
      -]New value: +[
      +  "entity_id"
      +]
  2. First observedv7.14.2

TDQS

A4.2/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 description correctly spends its space on non-obvious traits: config_hash stability across reads of an unchanged automation, and the specific conditions (missing bridge, unloaded/disabled automation) under which references is None and related is substituted. Some of this repeats field semantics that an output schema would carry, which keeps it below 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?

The purpose sentence is front-loaded and the examples are compact, but the middle paragraph is a dense run-on enumerating every return field, and the trailing keyword string ('read inspect fetch view existing automation config triggers conditions actions get show detail') is search-noise that adds nothing for an agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter read tool with an output schema, the definition covers input forms, failure modes, bridge-dependent field fallbacks, and a pointer to the documentation skill — an agent has enough to call it and interpret degraded results. It is somewhat over-complete on return-field detail while under-specifying how this differs from related read tools.

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 documents the single parameter, so the baseline is 3. The description earns the extra point by explaining resolution behavior — automation_id is the resolved entity_id, falling back to the raw input — which the schema does not convey.

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?

The opening sentence gives a specific verb and resource ('Get a Home Assistant automation's stored configuration') and scopes it to the stored body rather than a live state, which separates it from ha_config_get_script, ha_config_get_scene and ha_get_state in the sibling list.

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?

It states the input forms accepted (entity_id like 'automation.morning_routine' or a config id) through two concrete examples, and routes documentation requests to ha_get_skill_guide. It does not say when to prefer ha_get_entity or ha_get_automation_traces instead, so the exclusion guidance is incomplete.

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