workout_series
Retrieve a safe, downsampled time series of workout heart-rate data, including summary stats and point counts, to analyze performance within a response limit. Pass a reference max HR to compare time-in-zone across workouts.
Instructions
Get an agent-safe, auto-downsampled time series for a workout metric (contract agent-safe-series/v1). Points carry numeric t offsets in seconds from start_time. Always reports downsampled/source_points/returned_points/method plus full-resolution summary stats; never returns more than max_points points. For cross-activity comparison of time_in_zone, pass reference_max_hr (e.g. the athlete's known max HR); otherwise each activity is normalized to its own max and zone distributions are not comparable across activities.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metric | No | heart_rate | |
| max_points | No | Hard cap on returned points (server-enforced) | |
| resolution | No | Requested bucket size in seconds; increased automatically when needed to stay within max_points | |
| workout_id | Yes | ||
| reference_max_hr | No | Optional caller-provided reference max heart rate (bpm) used to normalize time_in_zone; pass a consistent value when comparing zone distributions across activities |