health_trends
Compute averages and totals over time from cached Google Health data, auto-syncing when stale. Compare periods across activity, sleep, heart rate, and more.
Instructions
Analyse trends in cached health data.
Computes averages and totals over time from the local cache, auto-syncing if stale.
Args: data_type: What to analyse. Options: "heart_rate", "activity", "exercises", "sleep", "weight", "spo2", "hrv", "azm", "breathing_rate", "skin_temperature", "core_temperature", "cardio_fitness", "food_log". Default: "activity". period: Aggregation period. Options: "weekly", "monthly", "quarterly". Default: "monthly". start_date: Start date as "YYYY-MM-DD" or "365d". Default: last 12 months. end_date: End date as "YYYY-MM-DD". Default: today. compare: Compare two periods. Format: "last_30d vs previous_30d", "2026-03 vs 2026-02", "2026-Q1 vs 2025-Q4". When set, period/start_date/end_date are ignored.
Returns aggregated averages per period. For activity: steps, distance, active minutes. For exercises: sessions, duration, calories. For sleep: duration, efficiency, stage breakdown. For heart_rate: resting HR min/avg/max. For weight: weight, fat%, BMI. For hrv: daily and deep RMSSD.
For cardio_fitness, avg_vo2_max_low/high average a reported band while avg_vo2_max averages a single value: two definitions, each with the count of readings behind it, never one series.
For spo2, min_spo2/max_spo2 are the lowest and highest bound among imported nights (counted by nights_observed_extremes), and avg_nightly_ci_low/avg_nightly_ci_high the mean of the nightly bounds this API reports (counted by nights_confidence_interval).
These fields and their counts appear in the period form only.
compare= reports spo2 as avg_spo2 alone, and carries both cardio_fitness
definitions.
For core_temperature, a reading whose value was changed in the app is counted as well as its earlier value, in both forms: check a high max_temp_celsius or readings_ge_38c with health_get_core_temperature.
Not for raw data - use health_get_* tools instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | monthly | |
| compare | No | ||
| end_date | No | ||
| data_type | No | activity | |
| start_date | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |