Skip to main content
Glama
ffleurey

ha-analytics-mcp

by ffleurey

ha_history_list_entities

Find the exact entity_id required by history analytics tools. Filter Home Assistant entities by area, device, device_class, or search, then group results by area and device for clear selection.

Instructions

Primary discovery tool for the exact entity_ids that the ha_history_* analytics tools require. Filter by area, device, device_class, and search. Results are grouped by area and device and include entity_id, name, unit, and type. For one entity's live state, use ha_history_get_state after discovery. Not needed before device-control (Hass*) tools — those take plain names and areas, never entity_ids.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
areasNoOptional area/room filter, e.g. ["Kitchen"] or ["Cave", "Kitchen", "Salon", "Outdoor"].
deviceNoOptional device-name filter when the user clearly refers to one appliance or device.
searchNoMatched against entity_id, friendly name, and device name. Multiple words use AND semantics. Use for name words like "cave" or "charger", not type words that device_classes can express.
domainsNoOptional entity domains, e.g. ["sensor"], ["binary_sensor"], or ["person","device_tracker"] for person tracking. Leave empty for statistics-ready entities.
max_resultsNoMax entity rows to return. Default: 100. Pass "all" for the complete list.
include_stateNoWhen true, adds the current state value to each row. Default: false. Costs one extra full state-machine fetch — use only when current values matter.
device_classesNoOptional device-class filter, e.g. ["temperature"] or ["temperature", "humidity"].
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses grouping behavior ('grouped by area and device'), the nature of search (AND semantics in schema, but implied), and the output shape. It does not explicitly state read-only safety or cost implications, but 'discovery tool' strongly implies no mutation and the schema covers include_state performance. It adds meaningful behavioral context 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?

Four sentences, front-loaded with the tool's core purpose, followed by usage context and exclusions. Every sentence adds distinct value with no redundancy or filler. The structure efficiently guides the reader from purpose to alternatives.

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?

The description provides essential context for a discovery tool: what it returns, how it groups results, and how it fits into the broader analytics workflow. It lacks details on pagination or max_results behavior, but those are in the schema. It adequately covers the tool's role and relationship to siblings.

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 description coverage is 100%, so baseline 3 applies. The description summarizes the main filters ('Filter by area, device, device_class, and search') but does not add new parameter details beyond the schema's own descriptions. It does not clarify relationships between filters or the meaning of domains, but schema handles that.

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 opens with a specific verb and resource: it is the 'Primary discovery tool for the exact entity_ids that the ha_history_* analytics tools require.' This clearly differentiates it from sibling tools by framing it as the precursor to analytics, and it lists concrete filter dimensions (area, device, device_class, search) and output contents (entity_id, name, unit, type).

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?

The description explicitly states when to use this tool ('before ha_history_* analytics') and when not to: 'Not needed before device-control (Hass*) tools — those take plain names and areas, never entity_ids.' It also directs users to ha_history_get_state for live single-entity state, providing an alternative for a distinct use case.

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