search_records
Find days when a health metric crossed a threshold. For cumulative metrics, filters on daily total; for rate metrics, filters on daily average. Results sorted highest to lowest to surface outliers.
Instructions
Find days where a health metric crossed a threshold. For cumulative metrics (steps, calories) filters on daily total. For rate metrics (HRV, heart rate) filters on daily average.
Examples:
All days with HRV below 40ms: metric_type='HKQuantityTypeIdentifierHeartRateVariabilitySDNN', max_value=40
Days with 10k+ steps: metric_type='HKQuantityTypeIdentifierStepCount', min_value=10000
Nights under 6 hours sleep (360 min): metric_type='HKCategoryTypeIdentifierSleepAnalysis', max_value=360
Results sorted highest-to-lowest so outliers surface first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metric_type | Yes | ||
| days | No | ||
| min_value | No | ||
| max_value | No | ||
| limit | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||