Skip to main content
Glama
Vortitron

home-assistant-mcp

by Vortitron

Create or update automation

ha_set_automation
Destructive

Create or update a Home Assistant automation by unique ID, supplying its alias, triggers, conditions, actions, and mode; saving reloads automations automatically.

Instructions

Create or update an automation by unique id. 'config' is the automation body (alias, trigger, condition, action, mode). Home Assistant reloads automations automatically after saving. Requires HA_ALLOW_WRITE=true and HA_ALLOW_CONFIG_WRITE=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
configYesAutomation config object: { alias, trigger, condition, action, mode, ... }.
instance_idNoOptional: the instance you mean (as listed by vomehome_list_instances). When given, the call is refused if this session is targeting a different home, instead of answering from it.
automation_idYesUnique id of the automation (existing id to update, or a new id to create).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and openWorldHint, so the safety profile is covered. The description adds genuinely new context: HA auto-reloads automations after saving and the call requires HA_ALLOW_WRITE and HA_ALLOW_CONFIG_WRITE, which is real prerequisite disclosure beyond the annotations.

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 with the operation front-loaded, followed by the config shape, the reload side effect, and the required flags. No filler; each sentence carries distinct information.

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 destructive, nested-object mutation tool with no output schema, the description covers the operation, the config body, the reload behavior and the write-permission prerequisites. Only minor gaps remain, such as whether a partial update overwrites unspecified fields.

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 automation_id, config and instance_id. The description reinforces that 'config' is the automation body (alias, trigger, condition, action, mode) but adds no syntax or format detail beyond what the schema states, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb pair (create or update) and resource (automation) keyed by unique id, which cleanly separates it from read/delete/trigger siblings like ha_get_automation and ha_delete_automation. It does not explicitly name an alternative, but the verb+resource is unambiguous.

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

Usage Guidelines3/5

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

The create-vs-update distinction is implied (whether the id already exists), and the reload-after-save note gives useful context, but there is no explicit when-to-use/when-not guidance or routing to alternatives such as ha_delete_automation or ha_reload_automations.

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