get_health_metrics
Retrieve values for a specific Apple Health metric or all metrics over a date range, with average, sum, min, max, or latest aggregation. Supports daily to yearly granularity.
Instructions
Get values for a metric (or all metrics) over an optional date range, with an aggregate (avg/sum/min/max/latest). The core data-retrieval tool. Every result carries a coverage block giving the metric's real firstDate/lastDate/days — check it before trusting a long window, and note that aggregate is always computed over the full range even when points are rolled up.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | YYYY-MM-DD | |
| limit | No | Maximum data points to return (default 365, max 3000). The server rolls up rather than truncating. | |
| start | No | YYYY-MM-DD | |
| metric | No | Metric name, e.g. step_count, heart_rate, sleep_analysis. Omit for all. | |
| aggregation | No | ||
| granularity | No | Roll daily values up before returning them. 'auto' (default) picks the finest granularity that fits the response budget, so a multi-year range returns monthly points instead of thousands of daily ones. |