Skip to main content
Glama
Vortitron

home-assistant-mcp

by Vortitron

Render a Jinja template

ha_render_template
Read-only

Render Home Assistant Jinja2 templates against live state and return the result, so you can test template sensors, automation conditions, and value_templates before deploying.

Instructions

Render a Home Assistant Jinja2 template against live state and return the result. Ideal for iterating on template sensors, automation conditions and value_templates until they produce the expected output. Example: "{{ states('sensor.outside_temp') | float < 5 }}".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
templateYesThe Jinja2 template to render.
variablesNoOptional variables made available to the template.
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds that evaluation happens against live (not cached) state, which is meaningful context, but says nothing about permissions, latency, or how the instance_id refusal behaves beyond what the schema states.

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?

Three sentences, purpose front-loaded, with the example placed last. Every sentence contributes; no filler or repetition 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?

Low-complexity read-only tool with fully documented schema and no output schema. 'Return the result' is somewhat vague about the return shape, but for a template renderer that is a minor gap given the annotations and complete parameter docs.

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%, so the baseline is 3. The inline example template '{{ states('sensor.outside_temp') | float < 5 }}' adds real value by demonstrating expected syntax for the required template param. It adds nothing for variables or instance_id, but the example lifts it above baseline.

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 (render) and resource (Jinja2 template) plus the scope ('against live state') and that it returns the result. No sibling tool performs templating, so the agent can distinguish it immediately.

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?

Gives concrete usage context: iterating on template sensors, automation conditions and value_templates until output is correct. However, it names no alternatives and gives no when-not guidance or prerequisites, so it stops short of a full routing statement.

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