Skip to main content
Glama
ffleurey

ha-analytics-mcp

by ffleurey

ha-analytics-mcp

Historical data analytics for Home Assistant: statistics, trends and session detection computed server-side, sized for small local models.

This is a read-only MCP server that answers questions about your own home's recorded sensor history: how much energy the car charger used last month, which room is coldest at 6am, how many times the washing machine ran last week. No tool in it can turn anything on, change a setting or write to Home Assistant. It is unrelated to analytics.home-assistant.io, Home Assistant's opt-in installation-statistics service; this server only reads your own instance's recorder database.

What it looks like in use

"How many times did I charge the car in February, and is that more than usual?"

The server resolves "February" to the last complete February in local time, reads hourly statistics for the charger's power sensor, groups readings above a threshold into sessions (bridging short dropouts), then runs the same detection over the reference period. One tool call returns the session count, total duration, the session list and the delta versus last year.

"Which rooms were coldest last week, and by how much?"

One call with four temperature entity_ids and aggregations: ["mean","min","max"] returns a single four-row comparison table. The model does not fetch four series and compare them; it reads a table that is already sorted, aligned and unit-checked.

"Did we use more electricity this month than last month?"

The server reads the meter's cumulative statistic, computes end minus start for both periods, resolves the reference dates itself and returns both totals plus the absolute and percentage delta. The model never sees a meter reading and never subtracts dates.

Related MCP server: influx-mcp

Why this server exists

Home Assistant's built-in MCP integration exposes live entity states and service calls, but no recorder history and no long-term statistics. The established community servers are built around device control and configuration, and the ones that do expose history return raw records for the model to interpret. Handing a model a JSON array of 8,760 hourly readings and asking for the average costs tens of thousands of tokens, and the arithmetic still comes back wrong often enough to be useless.

This server keeps the data out of the model entirely. It resolves the period, picks the right recorder API, fetches the minimum rows, does the arithmetic itself and returns a compact table holding the answer. In our test sessions, typical responses stay in the low hundreds of tokens regardless of how much history was scanned.

Get started

You need a Home Assistant long-lived access token: open your HA profile page (/profile), scroll to Long-Lived Access Tokens, click Create Token and copy it (it is shown only once). A dedicated HA user account keeps the audit trail clean.

npx (Claude Desktop, Claude Code, any stdio MCP client)

claude mcp add ha-analytics \
  -e HA_URL=https://homeassistant.local:8123 \
  -e HA_TOKEN=<your-long-lived-token> \
  -- npx -y ha-analytics-mcp

Or as client configuration JSON:

{
  "mcpServers": {
    "ha-analytics": {
      "command": "npx",
      "args": ["-y", "ha-analytics-mcp"],
      "env": {
        "HA_URL": "https://homeassistant.local:8123",
        "HA_TOKEN": "<your-long-lived-token>"
      }
    }
  }
}

Requires Node.js 22 or newer. With no arguments the server speaks stdio, which is what MCP clients launch.

Docker

{
  "mcpServers": {
    "ha-analytics": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "HA_URL", "-e", "HA_TOKEN",
        "ghcr.io/ffleurey/ha-analytics-mcp"
      ],
      "env": {
        "HA_URL": "https://homeassistant.local:8123",
        "HA_TOKEN": "<your-long-lived-token>"
      }
    }
  }
}

-i is required: the container talks MCP over stdin/stdout.

HTTP mode (LAN, or several clients against one instance)

docker run --rm -p 3000:3000 \
  -e HA_URL=https://homeassistant.local:8123 \
  -e HA_TOKEN=<your-long-lived-token> \
  -e HOST=0.0.0.0 \
  -e MCP_HTTP_TOKEN=$(openssl rand -hex 32) \
  ghcr.io/ffleurey/ha-analytics-mcp --http

The MCP endpoint is POST /mcp (Streamable HTTP); /health reports liveness without revealing your instance. The security contract is enforced at startup, not documented as advice:

  • The default bind address is 127.0.0.1, reachable only from the machine running the server.

  • Binding anywhere else (HOST=0.0.0.0, a LAN address) requires MCP_HTTP_TOKEN. The server refuses to start otherwise, with a message explaining why.

  • When MCP_HTTP_TOKEN is set, every /mcp request must carry Authorization: Bearer <token>, or the token as a ?token=<token> query parameter for clients that cannot set a custom header (such as Home Assistant's built-in MCP integration, see below). Comparison is constant-time either way.

One server process talks to exactly one Home Assistant instance. For two homes, register two MCP servers with different names: the client routes by name, and no tool needs a "which home" argument.

A Home Assistant add-on with zero-token setup (the Supervisor provides credentials, so there is no long-lived token to create or paste) is the next planned packaging step.

Use with Home Assistant Assist

Home Assistant's built-in stack, the Model Context Protocol integration plus a conversation agent, can talk to this server directly, without any extra chat UI. This path needs nothing beyond HA itself and a local or remote LLM connection. It works, with a few rough edges listed at the end of this section.

  1. Deploy the server in HTTP mode (see above) somewhere reachable from your Home Assistant instance, with MCP_HTTP_TOKEN set.

  2. Settings → Devices & services → Add Integration → "Model Context Protocol", and enter the server URL with the token as a query parameter, e.g. http://<server-host>:3000/mcp?token=<your-MCP_HTTP_TOKEN>. HA's MCP client has no token field, so the query parameter is the only way to authenticate. Requires Home Assistant 2026.2 or later for Streamable HTTP support; older versions only speak the deprecated SSE transport, which this server does not implement. Home Assistant logs full request URLs (including the token) at INFO level, so use a dedicated, low-privilege token for this integration rather than reusing one from another client.

  3. Add a conversation agent that supports tool calling. With the Ollama integration, raise num_ctx to at least 16k: this server's tool definitions alone are about 4.2k tokens, and Ollama's default num_ctx (8192) leaves too little room for the conversation once they are loaded. The llama.cpp integration pointed at an OpenAI-compatible endpoint (LM Studio, for example http://<lan-ip>:1234/v1) works as well.

  4. In the agent's options, enable this server's MCP API. Enable Assist's own API too if you want device control from the same agent; tool names get a namespace prefix when both are selected.

  5. Paste the agent instructions below into the agent's prompt field. Home Assistant's MCP client discards this server's own instructions (it never reads them), so without this step the model gets no guidance on entity discovery, tool choice or time formats.

  6. Settings → Voice assistants → Add assistant, and create a pipeline using that conversation agent.

  7. Chat in Assist.

Agent instructions, to paste verbatim into the conversation agent's prompt field:

You are a data analyst for this Home Assistant instance's history and statistics.
Answer from tool results only. State the sensor, period, and aggregation. Keep answers short and factual.
Never guess entity_ids — resolve them first with ha_history_list_entities, preferring areas/device/device_classes filters over free-text search.
For multi-area climate comparisons, one call with areas=[...] and device_classes=["temperature","humidity"] usually finds what you need.
For people or phone location history, use ha_history_list_entities with domains=["person"], domains=["device_tracker"], or both in one call.
Use ha_history_list_devices only when the device or area is still unclear, ha_history_list_device_entities only for one-device inspection, and ha_history_list_areas only when the exact area name is unknown.
If discovery returns weak or ambiguous matches, retry with a tighter filter before asking the user.
If a discovery call returns no matches, read the inventory included in its response: when the thing you look for is not listed there, it does not exist — report that to the user instead of retrying other search words.
Tool choice: ha_history_get_sensor_stats for instantaneous measurements, ha_history_get_consumption for cumulative meters, ha_history_detect_sessions for threshold-based activity, ha_history_get_state_history for discrete-state timelines, ha_history_get_state for current state.
Time formats: relative ("7d", "30d", "24h"), named ("last month", "yesterday", "Q1"), or ISO date. Default period: last 30 days.
If GetLiveContext and device-control (Hass*) tools are also available: prefer GetLiveContext for current values of exposed entities, use the ha_history_* tools for history, statistics, and entities GetLiveContext cannot see, and pass plain names and areas (never entity_ids) to the control tools.
Tool results may contain fenced (triple-backtick) code blocks holding compact tables — keep them fenced verbatim in your answer instead of reflowing them into prose.

Known limitations of this path, all on Home Assistant's side rather than this server's: tool calls have a 10-second timeout, hardcoded by HA's MCP client (very wide analytics queries can hit it; narrow the period if that happens). Assist's chat history expires after 5 minutes of inactivity. The agent instructions must be pasted manually every time you create or edit the agent, because Home Assistant has no mechanism to fetch them from the server.

Tools

Ten tools, all read-only. The discovery tools narrow a room or appliance concept down to exact entity_ids; the analytics tools then take those ids and return computed answers.

Tool

What it does

ha_history_list_areas

Lists areas (rooms and locations) defined in the instance.

ha_history_list_devices

Lists devices, filtered by area or name, with analytics-ready entity_ids.

ha_history_list_device_entities

Lists one device's entities with metric kind and analytics capability.

ha_history_list_entities

Primary entity search: filter by domains, areas, device, device_classes, free text.

ha_history_get_state

Current state, unit, timestamps and key attributes of one entity.

ha_history_get_current_time

The instance's current date, time and UTC offset; anchors relative periods.

ha_history_get_sensor_stats

Statistics over instantaneous sensors: mean/min/max/median/count, multi-entity comparison, interval time series, group_by hour-of-day or day-of-week, threshold filters.

ha_history_get_consumption

Consumption or production of cumulative meters (energy, water, gas): period totals, day/week/month breakdowns, previous-period or same-period-last-year comparison.

ha_history_detect_sessions

Threshold-based activity sessions from a numeric sensor: count, durations, peaks, gap bridging, per-day summary, period comparison.

ha_history_get_state_history

Discrete-state history: transition timelines, or time-in-state sessions for binary sensors, person/device_tracker, thermostat modes.

Every time parameter accepts what the user actually said: "7d", "last month", "february", "last winter", "Q1" or an ISO date. The server resolves it in the instance's timezone and echoes the resolved bounds back. Full parameter reference: TOOLS.md.

Designed for small models

The constraint this server is built against is an 8B model with an 8k context window, not a frontier model with a million. That constraint shapes the design rather than the tuning. Tool payloads are compact plain-text tables with a header stating sensor, period, aggregation and unit: cheaper to tokenize than nested JSON, and in our test sessions small models read values back out of them more accurately. All arithmetic happens in the server (date math, unit handling, deltas, percentages, session boundaries), because every reasoning step removed from the model is a step that cannot go wrong.

Errors teach recovery instead of reporting failure. Each error is a sentence saying what happened, why and what to do next, so the model corrects itself instead of hallucinating a plausible number. Empty discovery results include the complete inventory of what does exist plus an explicit stop rule, so asking about equipment your home does not have gets "that isn't monitored" within two or three tool calls instead of minutes of synonym-guessing before the same answer.

The design follows the MCP-server recommendations in mcpscope-chat-template (docs/MCP-DESIGN.md), and the server is developed and evaluated against local models with mcpscope, a workbench for benchmarking MCP servers against local (LM Studio, Ollama) or remote models with per-tool reliability and token-cost scoring. DESIGN.md records the design decisions in detail.

How it compares

Home Assistant's built-in mcp_server integration gives a model live state and service calls, with no access to the recorder's history or long-term statistics. The large community servers, led by homeassistant-ai/ha-mcp, are broad control-and-configuration surfaces, and the ones that expose history return raw records for the model to interpret. This server goes the other way: a small, read-only, single-purpose surface where every tool returns a computed answer rather than the data behind it, and nothing can change the state of your home.

It is meant to sit alongside a control server, not to replace one. If what you need is device control, automation management or a general-purpose assistant, one of the servers above will serve you better; COMPARISON.md maps the whole landscape, with links, so you can pick what fits.

Configuration

Variable

Required

Default

Notes

HA_URL

yes

(none)

Base URL of your instance, e.g. https://homeassistant.local:8123.

HA_TOKEN

yes

(none)

Home Assistant long-lived access token.

HA_NAME

no

Home

Display name used in tool descriptions and responses.

HA_TIMEZONE

no

from HA

Overrides the timezone reported by Home Assistant.

HA_INSECURE_TLS

no

0

Set to 1 to accept self-signed certificates. Certificates are verified by default.

HOST

no

127.0.0.1

HTTP mode only. Non-loopback values require MCP_HTTP_TOKEN.

PORT

no

3000

HTTP mode only.

MCP_HTTP_TOKEN

no

unset

HTTP mode only. Bearer token required on every /mcp request when set.

MAX_RESULTS

no

100

Default row cap for time-series responses.

CACHE_MAX_ENTRIES

no

500

In-memory cache size (LRU eviction).

See .env.example for the same list in file form.

Security

The server is read-only: it exposes no tool that calls a Home Assistant service, writes state or modifies configuration. The HA token is still a full-access token, so treat it accordingly: use a dedicated account and keep it in the environment, never in a committed file. TLS is verified by default; HA_INSECURE_TLS=1 exists for local instances with a private CA and should be a last resort, since the token travels in every request header. HTTP mode defaults to loopback and refuses to bind elsewhere without a bearer token, and the /health endpoint returns only status and uptime. Historical statistics are cached in memory only and cleared when the process exits.

Documentation

  • TOOLS.md: full tool surface: parameters, period formats, discovery flows, example outputs

  • DESIGN.md: design rationale: server-side computation, caching, error handling, API strategy

  • COMPARISON.md: how this server relates to the other Home Assistant MCP servers

  • CACHE.md: current cache behavior, its limits near "now" and the planned redesign

  • CONTRIBUTING.md: development workflow: lint, tests, smoke-testing

Contributing

Issues and pull requests are welcome. Read CONTRIBUTING.md first; it describes the change workflow the project expects. If you are proposing a new tool, say which question a small model should be able to answer with it in one call.

License

Apache License 2.0. See LICENSE and NOTICE.

Available Tools

10 tools
ha_history_detect_sessionsA

Detects activity sessions from a numeric sensor using a power/value threshold. Use for threshold-based activity questions such as charging sessions, appliance runs, or heating cycles. Uses long-term hourly statistics → full date range, no retention limit, ±1h precision. For binary sensors or person/zone state history, use ha_history_get_state_history instead. Returns event count, total duration, a compact session list, or a daily summary with group_by="day".

ParametersJSON Schema
NameRequiredDescriptionDefault
end_timeNoPeriod end, same formats as start_time. Default: now.
group_byNo"day" returns one row per day (date | count | first start | last end | total active) instead of individual sessions. Use for daily patterns ("how many runs per day?"). Summary stats always cover the full dataset.
entity_idYesExact entity_id resolved earlier, e.g. "sensor.car_charger_power". Do not guess.
thresholdYesMinimum value to count as "active", in the sensor's own unit. Example: 100 for a Watt sensor (EV charger, heater, washing machine).
comparisonNoCompare session count and duration to the immediately preceding equal-length period, or to the same calendar period 12 months ago.
start_timeNoPeriod start. Formats: relative (7d/30d/24h/2w/1y), named ("last month"/"last week"/"yesterday"/"last summer"/"Q1"), or ISO ("2026-04-01"). Default: 30d. Special: "overnight" = 22:00 yesterday → 06:00 today.
max_resultsNoMax rows (sessions, or days with group_by). Default: 20. Pass "all" to list all. Summary stats always cover the full dataset regardless.
day_start_hourNoOnly with group_by="day". Shifts the day boundary from midnight to this hour (0-23). E.g. 6 → a day runs 06:00-05:59, so 01:30 activity counts on the previous evening's date.
max_gap_minutesNoBridge inactive gaps shorter than this into one session (minutes). Default: 0 (no merging). E.g. 120 for a washing machine pausing between cycles. Hourly statistics → use multiples of 60; values below 60 have no effect.
min_duration_minutesNoDiscard sessions shorter than this (minutes). Default: 1. Hourly statistics → values below 60 have no additional effect.

TDQS

A4.4/5.0
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 key behavioral traits: 'Uses long-term hourly statistics → full date range, no retention limit, ±1h precision.' This is valuable context beyond a simple read operation. It also states what the tool returns (event count, total duration, session list, daily summary). Missing is an explicit statement that the operation is read-only, but the nature of the tool implies it. The precision limitation and data source disclosure earn a strong score.

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?

The description is four sentences, front-loaded with the core purpose, followed by use cases, a critical behavioral note, an alternative tool pointer, and output types. Each sentence adds distinct value without repetition. It is concise and well-structured for quick comprehension.

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 tool with 10 parameters and no output schema, the description covers the essential context: what it does, when to use, key limitations (precision), and the four output modes. It does not mention the 'comparison' feature (e.g., 'previous_period'), which is a notable capability, but the schema handles parameter-level details. Overall, it is complete enough for selection and basic invocation guidance.

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 the baseline is 3. The description adds a small amount of parameter context by mentioning 'group_by="day"' and 'compact session list' and 'daily summary,' but the schema already documents each parameter in detail. The description does not explain parameter interactions beyond what the schema provides, so it adds limited value beyond the baseline.

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 identifies the tool's purpose: 'Detects activity sessions from a numeric sensor using a power/value threshold.' It provides concrete use-case examples ('charging sessions, appliance runs, or heating cycles') and distinguishes from a sibling by stating 'For binary sensors or person/zone state history, use ha_history_get_state_history instead.' This is specific, actionable, and differentiates the tool from alternatives.

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 usage guidance is provided: 'Use for threshold-based activity questions' and a clear alternative for binary sensors/person/zone state history. It also implies when not to use (when the sensor is not numeric or threshold-based). The behavioral note about hourly statistics and precision helps set expectations for appropriate queries.

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

ha_history_get_consumptionA

Calculates how much energy, water, gas, or other resource was consumed or produced in Home over a time period. Use for totals, interval breakdowns, and period-over-period comparisons of cumulative meters. Always returns consumption (the change over the period), never raw meter readings. Do NOT use for instantaneous sensors (temperature, power in Watts) → use ha_history_get_sensor_stats.

ParametersJSON Schema
NameRequiredDescriptionDefault
end_timeNoPeriod end, same formats as start_time. Default: now.
intervalNo"none": total consumption for the whole period (default). "day": daily breakdown. "week": weekly. "month": monthly. Required when using filter_operator/filter_value.none
entity_idYesExact entity_id of a cumulative meter, resolved earlier, e.g. "sensor.home_energy_total". Do not guess.
comparisonNoOnly applicable with interval="none". Compares the total to a reference period. "previous_period": equal-length period immediately before. "same_period_last_year": same calendar dates 1 year ago. Returns both totals and the absolute/percentage difference.
start_timeNoPeriod start. Formats: relative (7d/30d/24h/2w/1y), named ("last month"/"last week"/"yesterday"/"last summer"/"Q1"), or ISO ("2026-04-01"). Default: 30d.
max_resultsNoApplies to interval breakdown only (not scalar). Default: 100. Pass "all" for complete series. Response shows total count when capped.
filter_valueNoThreshold for filter_operator. Required when filter_operator is set.
filter_operatorNoFilter results to buckets where consumption satisfies [op] filter_value. Requires interval. E.g. "which days used more than 10 kWh?" → interval="day", filter_operator=">", filter_value=10

TDQS

A4.6/5.0
Behavior4/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 a key behavioral trait: 'Always returns consumption (the change over the period), never raw meter readings.' While it does not mention permissions or side effects, the read-only nature is implied and the core behavior is clearly stated.

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?

The description is four sentences, each earning its place: purpose, use cases, behavioral guarantee, and exclusion with alternative. It is front-loaded with the main action and stays compact.

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?

Given the tool's complexity (8 parameters, no output schema) and rich input schema, the description provides essential high-level context: what the tool computes, when to use it, and when not to. It does not explain return structure, but the schema already details parameter behavior, making this 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 baseline is 3. The description adds meaning beyond the schema by specifying that entity_id should be a 'cumulative meter' and that the tool returns consumption rather than raw readings, which helps interpret parameters like start_time and comparison.

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 begins with a specific verb ('Calculates') and a clear resource ('energy, water, gas, or other resource... consumed or produced in Home over a time period'). It also distinguishes from a sibling by explicitly stating not to use it for instantaneous sensors and pointing to ha_history_get_sensor_stats.

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?

Provides explicit when-to-use guidance: 'Use for totals, interval breakdowns, and period-over-period comparisons of cumulative meters.' Also clearly states when not to use it and names the alternative tool: 'Do NOT use for instantaneous sensors... → use ha_history_get_sensor_stats.'

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

ha_history_get_current_timeA

Returns the current date and time from the Home Assistant server (Home). Call this before time-based queries that use relative or named periods such as "last month", "this winter", "yesterday", or "recently". Do not rely on your training data to infer the current date — it will often be wrong. Skip only if an absolute ISO date range has already been stated in this conversation.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.6/5.0
Behavior4/5

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

No annotations are provided, so the description carries the burden of behavioral disclosure. It adds valuable context by indicating the time is sourced from the Home Assistant server and not from training data. However, it does not specify the output format or timezone details, which would be helpful but not critical for a simple getter.

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?

The description is concise with exactly three sentences. The first sentence states the purpose, the second provides usage guidance, and the third gives an explicit skip condition. Every sentence earns its place, and the purpose is front-loaded.

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?

Given the tool's simplicity (no parameters, no output schema), the description covers the essential context: what it does, when to use, and when to skip. A minor gap is not describing the return format, but for a current-time getter an agent can infer enough to use it correctly.

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?

The tool has zero parameters, so the input schema is empty. According to the rubric, baseline is 4. The description does not need to explain parameters and adds no parameter info, but nothing is missing.

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 date and time from the Home Assistant server (Home).' It uses a specific verb ('Returns') and resource, and distinguishes itself from sibling history tools by being the only one providing current time.

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 tells when to use the tool: 'Call this before time-based queries that use relative or named periods...' and when to skip: 'Skip only if an absolute ISO date range has already been stated in this conversation.' It also warns against relying on training data, providing concrete usage context.

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

ha_history_get_sensor_statsA

Computes statistics for one or more instantaneous-value sensors such as temperature, humidity, CO₂, pressure, illuminance, or power in W. Always pass entity_ids as an array. Prefer one multi-entity call over repeated single-entity calls when units match. Use aggregations for several whole-period stats in one call. Use interval for time series and group_by for repeating patterns. Do not use for cumulative consumption in kWh; use ha_history_get_consumption. Do not use for event counting; use ha_history_detect_sessions.

ParametersJSON Schema
NameRequiredDescriptionDefault
end_timeNoPeriod end, same formats as start_time. Default: now.
group_byNoGroups by repeating time unit across the full period: "hour_of_day" or "day_of_week". Cannot be used with interval.
intervalNo"none" for one whole-period summary table; "hour"/"day"/"week"/"month" for time series. Cannot be used with group_by.
entity_idsYesArray of exact entity_ids. Use one item for a single sensor or multiple items for homogeneous comparisons. Resolve IDs first with ha_history_list_entities or ha_history_list_device_entities.
start_timeNoPeriod start. Formats: relative (7d/30d/24h/2w/1y), named ("last month"/"last week"/"yesterday"/"last summer"/"Q1"), or ISO ("2026-04-01"). Default: 30d.
max_resultsNoApplies to interval time series only. Caps rows, not columns. Default: 100. Pass "all" for the full series.
aggregationsNoStatistics to compute, e.g. ["mean"] or ["mean","min","max"]. Default: ["mean"]. median: whole-period only (interval="none", no group_by). count: alone, with group_by + filter — counts readings per slot that satisfy the filter (e.g. "how many days per hour exceeded 21°C?").
filter_valueNoThreshold for filter_operator. Required when filter_operator is set.
filter_operatorNoKeep only buckets where the aggregated value satisfies the threshold. Requires interval (not "none") or group_by.

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses the tool's scope (instantaneous-value sensors), the requirement to pass entity_ids as an array, and the intended usage patterns for aggregations/interval/group_by. It does not mention return value structure or error handling, but the absence of an output schema and the tool's statistical nature make this a minor gap. The description adds useful context about sensor types and unit matching, which 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?

The description is six sentences, each earning its place: purpose, array requirement, multi-entity preference, parameter usage, and two explicit exclusions. It is front-loaded with the core function and avoids redundancy. Nothing is wasted, and it remains concise despite covering multiple usage dimensions.

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?

Given the tool's complexity (9 params, no annotations, no output schema), the description is very complete. It explains the core behavior, parameter selection strategies, and alternatives. The only missing element is a description of the return format (e.g., a table of aggregates per sensor), but the schema's aggregations enum and the tool name imply this. This is a minor gap in an otherwise comprehensive description.

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 parameters are already well-documented. The description enriches this by explaining when to use which parameter ('Use aggregations for several whole-period stats,' 'Use interval for time series'), and adds guidance on entity_ids ('Always pass entity_ids as an array,' 'Prefer one multi-entity call...'). This adds practical semantics beyond the schema's field-level descriptions.

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 'Computes statistics for one or more instantaneous-value sensors' followed by concrete examples (temperature, humidity, CO₂, pressure, illuminance, power). It explicitly distinguishes from siblings by stating 'Do not use for cumulative consumption in kWh; use ha_history_get_consumption' and 'Do not use for event counting; use ha_history_detect_sessions.' This clearly identifies the tool's scope and differentiates it from probable alternatives.

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 provides explicit usage rules: 'Always pass entity_ids as an array,' 'Prefer one multi-entity call over repeated single-entity calls when units match,' and directs parameter selection: 'Use aggregations for several whole-period stats in one call. Use interval for time series and group_by for repeating patterns.' It also gives clear when-not-to-use guidance with named alternatives, covering exclusions and edge cases.

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

ha_history_get_stateA

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
entity_idYesExact entity_id resolved earlier, e.g. "sensor.living_room_temperature". Do not guess.

TDQS

A4.5/5.0
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.

ha_history_get_state_historyA

Gets the state-change history for any discrete-state entity in Home. Use for binary sensors (motion, door, window, presence), person/device_tracker (zone and location history), and any entity with named states.

Two modes: session mode when state_value is set, timeline mode when it is omitted. Source: HA recorder state history — limited to ~10 days by default. Returns a timeline of transitions, or session counts and durations when state_value is set.

ParametersJSON Schema
NameRequiredDescriptionDefault
end_timeNoPeriod end, same formats as start_time. Default: now.
group_byNoSession mode only. "day" returns one row per day (date | count | first | last | total active). Combine with day_start_hour=6 for overnight/cross-midnight grouping.
entity_idYesExact entity_id resolved earlier, e.g. "binary_sensor.entrance_motion". Do not guess.
comparisonNoSession mode only. Compare session count and duration to a reference period.
start_timeNoPeriod start. Formats: relative (7d/30d/24h/2w/1y), named ("last month"/"last week"/"yesterday"/"last summer"/"Q1"), or ISO ("2026-04-01"). Default: 30d. Special: "overnight" = 22:00 yesterday → 06:00 today.
max_resultsNoMax rows to return. Default: 20. Pass "all" to list all. Timeline mode: caps transitions shown. Session mode: caps sessions or days.
state_valueNoTarget state to detect sessions for, case-insensitive. Binary sensors: "on" or "off". Person/device_tracker: a zone name e.g. "home", "not_home". Prefix ! for "any state except", e.g. "!home" = time spent outside Home. Omit to get a full timeline of all state transitions instead.
day_start_hourNoOnly with group_by="day". Shifts the day boundary from midnight to this hour (0-23). E.g. 6 → post-midnight activity (01:30) is attributed to the previous evening's date.
max_gap_minutesNoSession mode only. Bridge inactive gaps shorter than this into one session (minutes). Default: 0 (no merging). E.g. 2-5 for motion sensors when a person pauses briefly.
min_duration_minutesNoSession mode only. Discard sessions shorter than this (minutes). Default: 0. Filters brief glitches, e.g. 1 for motion sensors.

TDQS

A4.2/5.0
Behavior3/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 the data source (HA recorder), a ~10 day limit, and the shape of returns (timeline or session counts/durations). Missing details include whether read-only is guaranteed, potential errors, or performance characteristics, but the provided context is adequate for a read-like tool.

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?

The description is four sentences, each earning its place: purpose, usage, mode distinction, and source/return summary. Front-loaded with the primary action and uses bullet-like clarity without redundancy.

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 complex tool with 10 parameters and no output schema, the description explains the two modes, the source, and the default retention limit. It lacks details on error handling or edge cases, but the schema and the mode explanation cover most of the essential context. A bit more detail on when session mode is preferable would push it higher.

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 baseline is 3. The description adds value by clarifying the relationship between state_value and the two modes, which is not explicitly stated in the schema. It also orients the reader to session mode vs timeline mode, enhancing parameter understanding beyond individual descriptions.

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 uses a specific verb 'Gets' and clearly identifies the resource: state-change history for discrete-state entities. It distinguishes from siblings by listing concrete use cases (binary sensors, person/device_tracker) and mentions two explicit modes. This makes the tool's purpose unambiguous.

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?

Provides explicit 'Use for' guidance with example entity types, and explains the two modes (session vs timeline) based on the state_value parameter. However, it does not explicitly exclude other tools or mention alternatives like get_state or get_sensor_stats, so there is room for more differentiation.

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

ha_history_list_areasA

Lists the areas (rooms and locations) defined in Home. Use when the user wants to explore areas or when you need the exact area name for ha_history_list_devices. Narrow by name with search. Returns area names to reuse with area="" in ha_history_list_devices, which also surfaces ready entity_ids.

ParametersJSON Schema
NameRequiredDescriptionDefault
searchNoOptional search term matched against area names (case-insensitive substring match). E.g. "kitchen", "outdoor", "bedroom". Leave empty to list all areas.
max_resultsNoMaximum number of results to return. Default: all areas.

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden. It discloses that the tool lists areas, supports search narrowing, and returns area names to be reused with area="<name>" in ha_history_list_devices. It stops short of explicitly stating the read-only nature or output format, but 'Lists' implies read-only, and the downstream usage hints at the return structure.

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 sentences, each essential. The first states the purpose, the second gives usage context, and the third explains filtering and downstream integration. No wasted words; the description is front-loaded and scannable.

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?

For a simple list tool with full schema coverage and no output schema, this description is complete. It covers purpose, usage scenarios, parameter semantics, and the relationship to a key sibling tool, giving the agent everything it needs to understand the tool's role and pick it correctly.

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?

The input schema already covers 100% of parameters, so baseline is 3. The description adds value by explaining the search parameter's purpose ('Narrow by name with search') and clarifying how the returned names will be used with the area='<name>' field in ha_history_list_devices, which gives semantic context beyond 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?

The description opens with 'Lists the areas (rooms and locations) defined in Home', a specific verb and resource. It clearly distinguishes itself from sibling ha_history_list_devices by mentioning areas vs devices, making the tool's scope unambiguous.

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 usage guidance is provided: 'Use when the user wants to explore areas or when you need the exact area name for ha_history_list_devices.' This not only states when to use but also references the alternative tool, giving the agent clear decision criteria.

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

ha_history_list_device_entitiesA

Lists entities (sensors and controls) on a specific device in Home. Use when ha_history_list_devices did not already surface the needed entity_ids or when you need a deeper per-device inspection. Returns entity_ids with their metric kind and analytics capability. Use measurement sensors with ha_history_get_sensor_stats and cumulative counters with ha_history_get_consumption.

ParametersJSON Schema
NameRequiredDescriptionDefault
deviceYesDevice name (case-insensitive). Use the device name from ha_history_list_devices. Partial name match is supported, e.g. "car charging" matches "Car Charging Plug".
max_resultsNoMaximum number of results to return. Default: 20.
device_classNoOptional metric-type filter, e.g. "power". Leave empty to show all analytics-capable entities on the device.
include_diagnosticsNoWhen true, includes diagnostic and config entities. Default: false.

TDQS

A4.2/5.0
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 format ('Returns entity_ids with their metric kind and analytics capability') which is useful. However, it does not explicitly state that this is a read-only operation or mention any other behavioral aspects like permissions or side effects, though listing strongly implies non-destructive behavior.

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 sentences, each serving a distinct purpose: state purpose, give usage conditions, and provide follow-up tool guidance. No filler or redundant content. The description is front-loaded with the core action.

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?

Given 4 parameters and no output schema, the description adequately covers when to use, what it returns, and how to proceed. The schema handles parameter details. It doesn't explicitly mention default behavior (e.g., max_results default) but that's in the schema. This is a solid, complete description for a list operation.

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 the schema already documents all parameters (device, max_results, device_class, include_diagnostics) with types and descriptions. The description adds no additional parameter semantics beyond referencing the device name from a prior tool, which is already hinted in the schema's device parameter description.

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 starts with a specific verb and resource: 'Lists entities (sensors and controls) on a specific device in Home.' It clearly distinguishes from sibling tools like ha_history_list_devices (which lists devices) and ha_history_list_entities (which lists all entities) by scoping to a single device.

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 when-to-use guidance: 'Use when ha_history_list_devices did not already surface the needed entity_ids or when you need a deeper per-device inspection.' It also names follow-up tools for appropriate entity types ('Use measurement sensors with ha_history_get_sensor_stats and cumulative counters with ha_history_get_consumption'), which helps the agent choose the right path.

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

ha_history_list_devicesA

Lists devices in Home, filtered by area or search. Use area for room-based discovery and search for device or appliance lookup. Returns matched devices together with analytics-ready entity_ids on each device. Use the returned entity_ids directly with the analytics tools. Call ha_history_list_device_entities only when you need deeper per-device inspection.

ParametersJSON Schema
NameRequiredDescriptionDefault
areaNoFilter by area name (case-insensitive). Use the area name from ha_history_list_areas. Leave empty to list all devices across all areas.
searchNoOptional search term matched against device names (case-insensitive substring match). E.g. "charger", "climate", "motion". Returns devices whose name contains the term.
max_resultsNoMaximum number of results to return. Default: unlimited when search or area is provided.
include_disabledNoWhen true, includes disabled devices. Default: false.

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries full burden. It clearly indicates a read-only listing operation and describes output as analytics-ready entity_ids. It could be more explicit about side-effect-free nature, but the behavior is transparent enough for a list operation.

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?

The description is three sentences, front-loaded with purpose, and every sentence adds value: what it does, how to use it, and what to do with results. No redundancy.

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?

Given no output schema, the description appropriately explains return values (devices with entity_ids) and provides cross-tool context. It covers the main use cases and directs to related tools, making it complete for a list/filter tool.

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 is 3. The description adds marginal semantic context for area and search (room-based vs device lookup), but does not significantly elaborate beyond the schema's parameter descriptions.

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 lists devices in Home, with filtering by area or search. It also distinguishes itself from related tools by explicitly directing use of the returned entity_ids with analytics tools and telling when to call ha_history_list_device_entities instead.

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 provides explicit usage guidance: use area for room-based discovery and search for device/appliance lookup. It also gives clear direction on when to use this tool versus ha_history_list_device_entities, and advises using returned entity_ids with analytics tools.

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

ha_history_list_entitiesA

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.

ParametersJSON 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"].

TDQS

A4.4/5.0
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.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 10 tool updatesv0.1.0
    • First observedha_history_detect_sessions
    • First observedha_history_get_consumption
    • First observedha_history_get_current_time
    • First observedha_history_get_sensor_stats
    • First observedha_history_get_state
    • First observedha_history_get_state_history
    • First observedha_history_list_areas
    • First observedha_history_list_device_entities
    • First observedha_history_list_devices
    • First observedha_history_list_entities

TDQS

A4.4/5.0
Disambiguation3/5

Multiple list tools (list_devices, list_device_entities, list_entities) overlap in returning entity_ids, and while descriptions offer guidance, the boundaries between device-centric and entity-centric discovery could confuse an agent. The analytics tools are well-separated by sensor type.

Naming Consistency5/5

All tools follow the ha_history_<verb>_<noun> pattern in snake_case, with verbs like list, get, and detect, making the set highly predictable and consistent.

Tool Count5/5

10 tools is well-scoped for a Home Assistant analytics server, covering discovery, state, statistics, history, and consumption without unnecessary bloat.

Completeness5/5

The tool set covers the full analytics workflow: discover areas/devices/entities, retrieve current state, compute stats, measure consumption, detect sessions, and inspect state history. No major gaps for the stated purpose.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Enhanced Home Assistant MCP server with 22 context efficient tools for smart home control, automation trace debugging, entity registry management, CEL expression queries, and long-term statistics.
    22
    3
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    MCP server for InfluxDB 2.x, tuned for Home Assistant long-term storage, enabling reading sensor history, finding anomalies, and running Flux queries.
    1
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    MCP server for chatting with physical-world data from robotics, drones, automotive, and IoT sources using natural language. It generates auditable SQL queries over Apache Arrow/DuckDB to let you analyze, summarize, and build data pipelines.
    18
    397
    Apache 2.0
  • F
    license
    Not graded
    quality
    B
    maintenance
    Read-only MCP server for querying AI usage metrics (exact tokens, cost, latency, errors, productivity) from a local SQLite database, enabling charts and analysis in Claude Code and Cursor.
    -

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