Skip to main content
Glama
Home Assistant MCP Server

Home Assistant MCP Server

by rilhia

Get state history

get_history
Read-onlyIdempotent

Retrieves the state changes for one or more Home Assistant entities over a chosen time window, returning a compact timeline so you can see when values changed and optionally include specific attributes.

Instructions

State changes for one or more entities over the last N hours, as a compact timeline.

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_ids": "<entity_ids>"
    },
    "name": "get_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
hoursNoHow far back to look.
limitNoMaximum state changes per entity, newest kept.
attributesNoAlso return these attributes at each change, for example ['temperature','brightness'].
entity_idsYesOne entity id or a list of entity ids.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered by structured data. The description adds only the 'compact timeline' framing, and leaves undisclosed behavior such as whether results are truncated per entity or what ordering applies (the schema's 'newest kept' covers only the limit semantics).

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?

A single front-loaded sentence with zero filler: resource, scope, and output form in that order. Nothing is repeated from the annotations or schema.

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?

No output schema exists, so the description carries some burden for describing return values, and 'compact timeline' is vague about what each entry contains. For a four-parameter read tool it is adequate to invoke correctly, but an agent cannot predict the response shape beyond a rough idea.

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%, with descriptive text for hours, limit, attributes and entity_ids, so the schema does the semantic work. The description only restates the entity scope and time window and adds nothing about the attributes parameter or accepted entity id formats, so 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 resource (state changes), scope (one or more entities, last N hours) and output shape (compact timeline), which is far more informative than the bare name. It does not distinguish itself from overlapping siblings such as explain_state_change, get_logbook, or get_statistics, so sibling differentiation is left to the agent.

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

Usage Guidelines3/5

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

Usage is implied: use it when you want raw state changes for known entity ids within a time window. There is no explicit when-not guidance and no pointer to alternatives like explain_state_change (for causes) or get_statistics (for aggregates), which is a real gap given how many sibling read tools exist.

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