Skip to main content
Glama
HiTechLabTN

hass-mcp

by HiTechLabTN

get_history

Retrieve the history of an entity's state changes over a specified number of hours. Get a summary with timestamps, count, and earliest/latest change times.

Instructions

Get the history of an entity's state changes

Args: entity_id: The entity ID to get history for hours: Number of hours of history to retrieve (default: 24)

Returns: A dictionary containing: - entity_id: The entity ID requested - states: List of state objects with timestamps - count: Number of state changes found - first_changed: Timestamp of earliest state change - last_changed: Timestamp of most recent state change

Examples: entity_id="light.living_room" - get 24h history entity_id="sensor.temperature", hours=168 - get 7 day history Best Practices: - Keep hours reasonable (24-72) for token efficiency - Use for entities with discrete state changes rather than continuously changing sensors - Consider the state distribution rather than every individual state

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hoursNo
entity_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the return structure and offers practical advice (e.g., keep hours 24-72 for token efficiency), but it does not explicitly state that the operation is read-only, what happens on invalid entity IDs, or any rate limits. This partial disclosure warrants a middle score.

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?

The description is well-organized into Args, Returns, Examples, and Best Practices, with the core purpose front-loaded. It is slightly verbose in the return section, but every sentence adds useful context and the structure is easy to scan.

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 simple read tool with a 2-parameter schema, the description covers purpose, parameters, output structure, examples, and performance guidance. However, it omits error conditions and does not clarify how this tool differs from the sibling get_history_range, leaving a contextual gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by explaining entity_id and hours, including the default value and example usages. This goes far beyond the schema field names and provides clear operational semantics.

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?

The description clearly states 'Get the history of an entity's state changes' with a specific verb and resource, and the arguments define the scope. It does not explicitly contrast with the sibling get_history_range, so it cannot earn a 5.

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

Usage Guidelines2/5

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

The description provides 'Best Practices' about entity types and token efficiency, but it never states when to use get_history versus the alternative get_history_range or get_statistics. Without explicit exclusionary or alternative guidance, usage context remains unclear.

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/HiTechLabTN/hass-mcp'

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