get_workouts
Retrieve Apple Health workouts for a date range or activity type. Filter by start/end, page through results, and get a summary count with optional heart-rate, power, and interval data.
Instructions
Query the workouts cache with {activityType (a name like Running, or a raw HealthKit id like 37), start, end} filters and pagination ({limit} default 50 max 200, {cursor} from a previous nextCursor). Records are returned exactly as stored, including the newer optional keys (avgHeartRate, maxHeartRate, running dynamics, cycling power, intervals, hasRoute) when the app exported them; older caches simply lack those keys and nothing is fabricated. Also returns summary {count, byActivityType} over everything that matched.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | YYYY-MM-DD | |
| limit | No | Workouts per page (default 50, max 200). | |
| start | No | YYYY-MM-DD | |
| cursor | No | Opaque cursor from a previous call's nextCursor. | |
| activityType | No | Activity name (e.g. Running) or raw HealthKit activity id (e.g. 37). |