Skip to main content
Glama
Vortitron

home-assistant-mcp

by Vortitron

Get entity history

ha_get_history
Read-only

Fetch historical state changes for one or more Home Assistant entities over a time window, defaulting to the last day when no start time is provided.

Instructions

Get historical state changes for one or more entities over a time window. Times are ISO 8601 (e.g. 2026-06-05T06:00:00+00:00). Defaults to the last day if no start_time is given; with a start_time and no end_time it runs up to now (Home Assistant on its own would stop 24 hours after the start).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
minimalNoReturn minimal response (state + last_changed only) to reduce size.
end_timeNoISO 8601 end timestamp.
entity_idsYesEntities to fetch history for.
max_pointsNoReturn each series as at most this many [time, value] points: numbers averaged per time bucket, other states as each bucket's last. For charts: a day of a sensor can be thousands of states.
start_timeNoISO 8601 start timestamp.
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.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, and the description adds non-obvious behavior beyond that: the default time window and the fact that this tool overrides Home Assistant's native 24-hour cutoff. It does not discuss result size or rate characteristics, which keeps it below a 5.

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 dense sentences, front-loaded with the core purpose followed by time-window semantics. The parenthetical about Home Assistant's native cutoff earns its place, though the phrasing is slightly wordy.

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?

For a read-only query tool with a fully documented 6-parameter schema and no output schema, the description covers the critical ambiguity (default time ranges) that would otherwise cause wrong calls. It could hint at the returned shape (per-entity series) since no output schema exists, but overall it is sufficient.

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 would be 3, but the description adds meaning the schema does not: the default/fallback behavior of start_time and end_time and the ISO 8601 format expectation. It still doesn't clarify minimal or max_points trade-offs, which are covered only in the schema.

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+resource ("Get historical state changes") plus scope ("one or more entities over a time window"), which cleanly separates it from sibling readers like ha_get_state (current state) and ha_get_logbook. An agent can route to it without opening the schema.

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 clear operational context: default window is the last day, and a start_time without end_time runs to now (with the note that Home Assistant alone would stop after 24h). It does not name alternatives (e.g. ha_get_logbook for event-style history), so it stops short of explicit when/when-not routing.

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