Skip to main content
Glama
tim661811
by tim661811

Query sensor history

homey_insights_query
Read-onlyIdempotent

Retrieve Homey insights series statistics and compare windows. Returns min, max, mean, median, delta, energy consumption by log type, and data coverage to avoid misreading gaps.

Instructions

Fetches up to five Insights series at one resolution and returns statistics computed over them: min, max, mean, median, first, last and delta, plus the true window and step the hub answered with and the share of it that actually carries samples. Gaps are skipped rather than filled in, so always read the coverage next to an average. Use compareWith to fetch a second window and get the differences, which is what questions like "warmer than last week" need. Energy logs are summarised correctly for their kind: meter_power is a cumulative counter, so consumption is the difference between its endpoints, while measure_power is instantaneous watts, so energy is the area under it. Find log ids with homey_insights_search first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
logsYesUp to 5 log ids from homey_insights_search, for example "homey:device:<device-id>:measure_temperature". A device-and-log name is accepted too, and comes back as a candidate list when it fits more than one log.
groupByNoAlso return per-period statistics, cut in the Homey's timezone rather than UTC.
maxValuesNoPoint budget per series when includeValues is set. Defaults to 100; longer series are thinned evenly and the statistics still cover every point.
resolutionNoWindow to fetch. Defaults to last24Hours. Calendar windows are cut in the Homey's own timezone.
compareWithNoA second window to fetch and compare against, for example thisWeek against lastWeek.
includeValuesNoInclude the individual readings as well as the statistics. Off by default: a day of data is around 290 points per log.
Install Server

TDQS

A4.9/5.0
Behavior5/5

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

The description adds key behavioral context beyond the readOnly/idempotent/destructive annotations: gaps are skipped rather than filled, the hub returns the true window/step and coverage share, and energy logs are summarized differently by type (meter_power vs measure_power). This explains important edge semantics the annotations don't cover.

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 compact and information-dense: the first sentence conveys the core function and output, and each subsequent sentence adds a distinct, high-value understanding (coverage, comparisons, energy semantics, discoverability). No wasted words or repetition.

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?

Without an output schema, the description compensates by listing the statistics and explaining the hub-returned window, step, and coverage. It covers usage flow (search first), noteworthy edge cases, energy log behavior, and intended patterns, making it complete for an agent to select and invoke the tool.

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 documents every parameter with 100% coverage, giving the baseline. The description adds extra meaning for key parameters such as compareWith (second window for difference queries), logs (candidates when ambiguous), and resolution (calendar windows in Homey's timezone). It doesn't explain every parameter in detail, but the schema covers those, so the overall semantics are strong.

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 precise verb and resource: 'Fetches up to five Insights logs at one resolution and returns statistics computed over them' and names the exact statistics and output fields. It clearly distinguishes itself from sibling tools by directing users to homey_insights_search for log discovery and homey_energy_live for live energy.

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 gives explicit when-to-use guidance: use compareWith for comparison queries like 'warmer than last week', and always find log ids with homey_insights_search first. It also guides on interpreting averages with coverage and correctly handling energy log kinds, which is decisive for choosing and using the tool.

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

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/tim661811/homey-mcp'

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