Analyse trends in cached Fitbit 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 spo2: avg/min/max oxygen saturation. For hrv: daily and deep RMSSD.
Not for raw data - use fitbit_get_* tools instead.