Skip to main content
Glama
ffleurey

ha-analytics-mcp

by ffleurey

ha_history_get_state

Retrieve the current state of a Home Assistant entity by its exact entity_id, including hidden entities. Provides value, unit, timestamps, and key attributes for staleness checks.

Instructions

Returns the current state of one Home entity by exact entity_id. Works for all entity domains, including entities not exposed to the voice assistant. Returns the state value, unit, last_changed/last_updated timestamps, and key attributes. If a GetLiveContext tool is available, prefer it for current values of exposed entities; use this tool for entities it cannot see, for staleness checks via timestamps, or when the entity_id is already resolved.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_idYesExact entity_id resolved earlier, e.g. "sensor.living_room_temperature". Do not guess.
Behavior4/5

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

With no annotations, the description appropriately discloses what is returned (state value, unit, timestamps, attributes) and the tool's broad domain support. It could explicitly state it's a read-only operation, but the name and context strongly imply that. The information goes beyond the schema.

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 concise sentences: first states the function, second broadens scope, third gives alternative usage guidance. Every sentence earns its place without redundancy or fluff.

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

Completeness5/5

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

The tool is simple, but the description covers purpose, scope, return values, and usage alternatives. There is no output schema, so the description's list of returned fields is valuable and sufficient for an agent to understand what to expect.

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 100%, and the schema already describes the parameter precisely (exact entity_id, do not guess). The description repeats that it requires the exact entity_id but adds no extra semantics beyond the schema. Baseline of 3 is appropriate.

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 returns the current state of one entity by exact entity_id, which is specific and distinguishes it from history-related siblings like ha_history_get_state_history. It also notes it works for all domains, including hidden entities, adding scope clarity.

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

Usage Guidelines5/5

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

Explicit guidance is provided: prefer GetLiveContext for exposed entities, and use this tool for entities it cannot see, for staleness checks, or when entity_id is already resolved. This clearly tells the agent when to choose this tool over alternatives.

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/ffleurey/ha-analytics-mcp'

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