Analyze an activity
garmin_analyze_activityComputes heart rate and power zone time, normalized power, TSS, aerobic decoupling, first/second-half splits, best efforts, TRIMP, and work intervals from one Garmin activity's FIT data.
Instructions
Compute training metrics for one activity from its second-by-second FIT data:
time in heart rate zones (the user's Garmin zones for that sport) and, with an FTP, in power zones (Coggan)
power: average, normalized power (NP), variability index, intensity factor and TSS (needs FTP)
aerobic decoupling: drift of power or pace per heartbeat between the first and second half (<5% is good for steady efforts of 45+ min)
first vs second half (negative/positive split)
best efforts: power over 5 s–60 min, heart rate over 1–60 min, fastest 400 m–marathon (running), 5–90 km (cycling), 100 m–3.8 km (swimming)
Edwards TRIMP (zone-weighted minutes) and detected work intervals with their consistency
FTP comes from ftp_w, else from the activity's own record (Garmin cycling FTP). Works for multisport legs too.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ftp_w | No | Functional threshold power in watts, for power zones, IF and TSS | |
| activity_id | Yes | Garmin activity ID from garmin_list_activities | |
| response_format | No | 'markdown' for readable text (default), 'json' for complete structured data | markdown |