CGM hypo events
cgm_hypo_eventsDetect hypoglycemia events in a CGM time window, returning each below-threshold run's duration, severity, and recovery time.
Instructions
v0.3.3 — Detect hypoglycemia events between from and to ISO dates. Returns an array of contiguous below-threshold runs lasting ≥ min_duration_minutes, each with started_at, ended_at, duration_minutes, min_glucose_mg_dl, mean_glucose_mg_dl, severity (level_1 = <70 ADA Level 1, level_2 = <54 ADA Level 2), and recovery_time_minutes (time to first reading ≥ threshold+10). Also returns total_events, total_minutes_below, mean_min_glucose, events_per_day, a summary string, and recommendations grounded in what was actually observed. window is the span REQUESTED; hours_covered, observed_window and window_truncated_by_provider state what the provider actually returned — FreeStyle Libre (LibreLink Up) caps a live read at ~12h, so a 3-day question can be answered from half a day and notes says so. "No hypos" is only true for hours_covered. MEDICAL DISCLAIMER: NOT medical advice. Do not use for treatment decisions. Hypo events should be discussed with your clinician.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | ISO-8601 timestamp / date of the analysis window end. | |
| from | Yes | ISO-8601 timestamp / date of the analysis window start. | |
| privacy_mode | No | Optional privacy mode: summary | structured | raw. summary omits device/patient identifiers when present; structured/raw return full payload. | |
| response_format | No | Output shape. "structured" (default) returns the full event array. "summary" omits the per-event array, keeping totals + summary + recommendations. | |
| threshold_mg_dl | No | Hypo threshold in mg/dL. Default 70 (ADA Level 1). | |
| min_duration_minutes | No | Minimum contiguous-minutes-below-threshold to count as an event. Default 15. | |
| severe_threshold_mg_dl | No | Severe hypo threshold in mg/dL. Default 54 (ADA Level 2). |