| get_current_glucoseA | Get the current glucose reading.
Returns the most recent glucose value, trend direction,
and timestamp. Reading must be within the last 10 minutes.
|
| get_glucose_readingsA | Get historical glucose readings.
Args:
minutes: Number of minutes to look back from now (1-1440, default 60)
start_minutes: Window start - minutes ago from now (e.g., 240 = 4 hours ago)
end_minutes: Window end - minutes ago from now (e.g., 180 = 3 hours ago)
max_count: Maximum readings to return (1-288, default 288)
data: Optional external readings for persistence layer integration.
Examples:
get_glucose_readings(minutes=60) # Last hour
get_glucose_readings(start_minutes=240, end_minutes=180) # 4h ago to 3h ago
get_glucose_readings(start_minutes=360, end_minutes=300) # 6h ago to 5h ago
Note: When using start_minutes/end_minutes, we fetch from start_minutes back
and filter to the window. start_minutes should be > end_minutes (further back in time).
|
| get_statisticsA | Get glucose statistics for a time period.
Args:
minutes: Number of minutes to analyze (1-1440, default 1440 = 24h)
start_minutes: Window start - minutes ago from now (e.g., 240 = 4 hours ago)
end_minutes: Window end - minutes ago from now (e.g., 180 = 3 hours ago)
low: Low threshold in mg/dL (default 70)
high: High threshold in mg/dL (default 180)
data: Optional external readings for persistence layer integration.
Examples:
get_statistics(minutes=180) # Stats for last 3 hours
get_statistics(start_minutes=240, end_minutes=180) # Stats for 4h to 3h ago
|
| get_status_summaryA | Get a complete status summary - the "how am I doing?" tool.
Returns current glucose, recent trend, stats for the specified period,
any alerts, and a plain-English summary. Perfect for quick check-ins,
clinical dashboards, or health intelligence apps.
Args:
minutes: Time period for context stats (1-1440, default 180 = 3 hours)
Returns:
- current: Real-time glucose, trend, arrow
- period_stats: Average, min, max, time-in-range for the period
- alerts: Any recent lows/highs detected
- summary: Plain-English interpretation with urgency level
|
| detect_episodesA | Detect hypoglycemic and hyperglycemic episodes.
Args:
minutes: Time period if using Dexcom API (1-1440, default 1440 = 24h)
start_minutes: Window start - minutes ago from now (e.g., 240 = 4 hours ago)
end_minutes: Window end - minutes ago from now (e.g., 180 = 3 hours ago)
low: Low threshold in mg/dL (default 70)
high: High threshold in mg/dL (default 180)
data: Optional external readings for persistence layer integration.
Schema: [{"glucose_mg_dl": int, "timestamp": "ISO-8601"}, ...]
Examples:
detect_episodes(minutes=180) # Episodes in last 3 hours
detect_episodes(start_minutes=240, end_minutes=180) # Episodes 4h to 3h ago
|
| get_episode_detailsA | Get detailed context for each glucose episode - what led to it,
how severe it was, and how recovery went.
Args:
minutes: Time period if using Dexcom API (1-1440, default 1440 = 24h)
low: Low threshold in mg/dL (default 70)
high: High threshold in mg/dL (default 180)
data: Optional external readings for persistence layer integration.
|
| analyze_time_blocksA | Analyze glucose by time of day - find when problems happen.
Breaks down data into overnight (00-06), morning (06-12),
afternoon (12-18), and evening (18-24).
Args:
minutes: Time period if using Dexcom API (1-1440, default 1440 = 24h)
low: Low threshold in mg/dL (default 70)
high: High threshold in mg/dL (default 180)
data: Optional external readings for persistence layer integration.
|
| check_alertsA | Check current glucose against alert thresholds.
Simple threshold check for real-time alerting.
Args:
urgent_low: Urgent low threshold (default 54)
low: Low threshold (default 70)
high: High threshold (default 180)
urgent_high: Urgent high threshold (default 250)
|
| export_dataA | Export glucose readings for persistence layer integration.
Returns clean, consistent data structure for storage in external databases.
Call periodically to build long-term data history.
Args:
minutes: Time period to export (1-1440, default 1440 = 24h)
start_minutes: Window start - minutes ago from now (e.g., 240 = 4 hours ago)
end_minutes: Window end - minutes ago from now (e.g., 180 = 3 hours ago)
format: Export format - "json" or "csv" (default "json")
data: Optional external readings to format/export instead of fetching.
Examples:
export_data(minutes=180) # Export last 3 hours
export_data(start_minutes=240, end_minutes=180) # Export 4h to 3h ago
|
| get_agp_reportA | Generate an Ambulatory Glucose Profile (AGP) report.
AGP is the clinical standard used by endocrinologists. Shows glucose
percentiles by time of day to identify patterns.
Args:
minutes: Time period if using Dexcom API (1-1440, default 1440 = 24h)
data: Optional external readings for persistence layer integration.
|