Skip to main content
Glama
Home Assistant MCP Server

Home Assistant MCP Server

by rilhia

Validate script config

validate_script_config
Read-onlyIdempotent

Checks a draft script configuration before saving by running structural and Home Assistant validation and flagging nonexistent entities.

Instructions

Check a draft script config without saving it. Runs a local structural check, asks Home Assistant to validate the sequence through the validate_config WebSocket command, and warns about entities that do not exist.

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": {
      "config": "<config>"
    },
    "name": "validate_script_config"
  }
}

Input Schema

NameRequiredDescriptionDefault
configYesThe script config to check, as JSON.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive behavior, so the bar is lower; the description still adds real value by disclosing the three-stage execution (local structural check, remote validate_config WebSocket call, entity-existence warnings) and that nothing is saved.

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?

Two sentences, front-loaded with the non-persisting validation purpose, followed by the mechanism. No filler or restatement of the title.

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?

No output schema exists, but the description implies the return content (structural findings, HA validation result, unknown-entity warnings) well enough for an agent to interpret results. Minor gap: no indication of whether validation stops at the first failure or reports all issues.

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?

Only one parameter, and the schema already describes it at 100% coverage ('The script config to check, as JSON'). The description adds no format, shape, or required-key detail beyond what the schema provides, so the 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 and resource: check a draft script config without persisting it. The word 'script' distinguishes it from the sibling validate_automation_config, though the sibling is never named explicitly.

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?

'Check a draft script config without saving it' gives a clear usage context — pre-save validation. It does not state when to prefer this over validate_automation_config or check_config, so no explicit exclusions/alternatives are provided.

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