Skip to main content
Glama

Hourly (circadian) trends

get_hourly_trends
Read-only

Pool glucose readings by clock hour across a date range to reveal recurring daily patterns like dawn phenomenon and evening highs, explaining why glucose is high or low at certain times.

Instructions

Time In Range and average glucose pooled by clock-hour across the whole window, so every reading that fell in the 07:00 hour on any day is combined into one 07:00 row, and so on for all 24 hours.

Use it for "why am I always high/low at a certain time" questions, recurring circadian patterns, the dawn phenomenon and evening highs.

Hours are the device's own wall-clock hour (not UTC) — this already IS the patient's local hour at the time each reading was taken, so present it as-is with no conversion.

Returns: a byHour array of up to 24 rows, each with hour (wall clock, "HH:00"), averageBG, timeInRange, timeLow, timeHigh and the reading count for that hour. Glucose values are in the configured unit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endYesRequired. Window end as an ISO 8601 timestamp, e.g. 2026-06-20T00:00:00.000Z — plain wall clock time, same caveat as start (the "Z" is a format artifact, not a UTC claim). Treated as inclusive and must be after start. All timestamps returned by this API are likewise plain wall clock time, unconverted.
lowerNoOptional. Low (hypo) boundary in the chosen unit; readings below it count as time-low. Omit to use the server default (OMNI_LOWER). Pass only to override for this one call, e.g. to ask about time under a different threshold.
startYesRequired. Window start as an ISO 8601 timestamp, e.g. 2026-06-19T00:00:00.000Z. IMPORTANT: despite the trailing "Z", this is plain WALL CLOCK time, not true UTC — Glooko records only the literal date/time the patient's device showed, with no timezone attached. Use the patient's own wall-clock digits directly (no conversion): resolve "yesterday" or "last 3 weeks" straight into the matching wall-clock date and time. Treated as inclusive.
unitsNoOptional. Glucose unit for this call. Omit to use the unit configured on the server (OMNI_UNITS). One of: "mmol" (mmol/L) or "mgdl" (mg/dL). Pass only to override the configured unit for this one call.
upperNoOptional. High (hyper) boundary in the chosen unit; readings above it count as time-high. Omit to use the server default (OMNI_UPPER). Pass only to override for this one call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses a non-obvious behavioral trait: hours are the device's wall-clock hour, not UTC, and must be presented as-is with no conversion. It also explains how data is pooled across the window and what fields the returned rows contain. This adds real value over the annotation.

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?

Every sentence earns its place: core aggregation method, usage scenarios, the critical UTC/wall-clock warning, and the return shape. The structure is front-loaded and there is no filler or 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?

With no output schema, the description appropriately lists the output row shape (byHour array, fields, wall-clock 'HH:00') and unit semantics. It is missing details such as whether hours without readings are omitted or zero-filled and the exact scale/data types of timeInRange, timeLow, and timeHigh, which may be needed for correct interpretation.

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 documents all five parameters with detailed caveats (ISO format, wall-clock quirk, overrides). The description only reiterates that glucose values are in the configured unit, which the schema already covers, so the baseline 3 is correct.

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 states exactly what the tool does: it pools Time In Range and average glucose by clock-hour across the whole window, with a concrete example ('every reading that fell in the 07:00 hour on any day is combined into one 07:00 row'). This is a specific verb/resource/aggregation, clearly distinct from raw glucose retrieval or generic trend tools.

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?

The description gives explicit when-to-use guidance: circadian questions, recurring high/low-at-certain-time patterns, dawn phenomenon, and evening highs. These are concrete use cases, but it does not explicitly say when not to use the tool or name alternatives (e.g., get_trend, get_glucose), so it stops at 4.

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