Skip to main content
Glama
Home Assistant MCP Server

Home Assistant MCP Server

by rilhia

Wait for an entity state

wait_for_state
Read-onlyIdempotent

Waits for a Home Assistant entity to reach a target state or change within a timeout, helping confirm that a sent command actually took effect.

Instructions

Wait until an entity reaches a state, or changes from its current state if no target is given, or the timeout passes. Useful after sending a command, to confirm the device really did it.

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": "wait_for_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
stateNoTarget state, for example 'on' or 'locked'. Omit to wait for any change.
entity_idYes
timeout_sNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A3.9/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, non-open-world behavior, so the safety profile is covered. The description adds what annotations cannot: this is a blocking call that either waits for a target state, for any change, or until a timeout. It does not say what the call returns or does when the timeout fires, which is the main behavioral gap.

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, no filler, leading with the core waiting behavior and mode branching before the use case. Every clause carries information.

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

Completeness3/5

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

For a simple 3-parameter read-only tool this covers the modes and the timeout bound, but with no output schema the description should say what a successful wait or a timeout returns, and it says nothing about entity_id expectations.

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 coverage is 33%: entity_id and timeout_s have no descriptions, and the description does not fill that void. It does restate the semantics of the optional state parameter (wait for any change when omitted), but the schema already covers that, so the added value is modest.

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?

A specific verb (wait) and resource (entity state) with the two operating modes stated, so an agent can tell it apart from pure read tools like get_entity_details. It doesn't name a sibling explicitly, so it stops short of full differentiation.

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?

"Useful after sending a command, to confirm the device really did it" gives a concrete situation for reaching for this tool. No exclusions or named alternatives are offered, but the usage context is genuinely actionable.

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