Skip to main content
Glama

automations_validate_best_practices

Validates Home Assistant automation YAML against best practices, checking for common issues like missing mode, alias, id, or deprecated service keys. Returns a summary with warnings and info.

Instructions

Validate automation YAML against HA best practices (static linter).

Accepts a single automation dict or a list of automation dicts.

Checks:

  • state trigger without 'for:' (bounce risk)

  • missing 'mode:' declaration

  • multiple triggers without 'id:' fields

  • missing 'alias:' / 'id:'

  • deprecated 'service:' key in actions (use 'action:' in HA 2024.8+)

  • 'restart' mode caution

  • missing 'description:'

Returns: {valid_yaml, automations_checked, issues_total, warnings, infos, issues[], summary} Each issue: {automation, rule, severity, message} severity: 'warning' = should fix, 'info' = good to know.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yaml_contentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations are provided, so the description carries full burden. It details specific checks performed (state trigger, mode, etc.) and the return structure, implying a read-only analysis. However, it does not explicitly state that the operation is non-destructive or mention any required permissions or rate limits.

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?

The description is front-loaded with purpose and provides a bulleted list of checks and a structured return format. It is well-organized but somewhat lengthy; some details might be redundant if the output schema were documented.

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?

Given that no annotations exist and the schema provides no descriptions, the description covers purpose, usage, parameter meaning, and return format extensively. It is missing an explicit statement about the tool being read-only and does not mention any prerequisites, but overall it provides sufficient context for an agent to use it correctly.

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 0%, and the description adds that the tool accepts a single automation dict or a list of automation dicts. However, the schema shows a single string parameter 'yaml_content', creating ambiguity about whether the input should be a YAML string. The description would benefit from clarifying that the parameter is a YAML-formatted string.

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 description clearly states the tool validates automation YAML against HA best practices, using a specific verb ('validate') and resource ('automation YAML'). It distinguishes itself from siblings like 'automations_validate_automation_references' by specifying it is a static linter, not a reference checker.

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 description implies usage for static linting of automation YAML, but does not explicitly state when to use this tool versus alternatives like 'files_validate_yaml_content' or 'automations_validate_automation_references'. There are no exclusions or guidance on prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Fistacho/ha-nexus-agent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server