Skip to main content
Glama

Hourly (circadian) trends

get_hourly_trends

Analyze glucose trends by hour of day to identify recurring patterns like dawn phenomenon or evening highs. Returns hourly average BG, time in range, and basal states.

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. When basal-state data exists, each row also has a "basal" object: the share of observed time in that hour spent in each Omnipod 5 algorithm state (normalPercent, suspendPercent, maxPercent, limitedPercent, plus observedMinutes). These are STATES, not insulin units, pooled across days like the glucose figures, so "suspendPercent 40 at 03:00" means basal was paused for 40% of the 03:00 hours observed. Glucose values are in the configured unit.

Input 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.2.1

TDQS

A4.2/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 and does so well: it explains the wall-clock (non-UTC) semantics explicitly, warns against conversion, and clarifies that basal figures are states not insulin units. It omits table-stakes operational context like auth/permissions or rate limits, but for a read query the data semantics are unusually well disclosed.

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?

Front-loads the core purpose, then usage, then returns — a sensible ordering. The clock-hour example sentence is slightly verbose but genuinely clarifying, and every other line carries weight.

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?

There is no output schema, so the description must explain return values, and it does: it enumerates the byHour row fields, the conditional basal object and its fields, and the units caveat. An agent has everything needed to call and interpret the result.

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 start, end, lower, upper, and units thoroughly. The description restates the wall-clock caveat and unit behavior but adds no parameter syntax or format beyond the schema, so the baseline 3 applies.

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?

States a specific computation and resource: Time In Range and average glucose pooled by clock-hour across the window, with the 07:00-all-days-into-one-row explanation making the aggregation unambiguous. This clearly distinguishes it from the more general get_trend and get_glucose siblings.

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?

Gives concrete triggering questions ('why am I always high/low at a certain time') and named phenomena (circadian patterns, dawn phenomenon, evening highs), which is strong context. It stops short of explicitly naming an alternative sibling or stating when NOT to use it, so it does not reach 5.

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