get_activity_segments
Split one Garmin activity into climb, flat, and descent segments to analyze heart rate, pace, cadence, and respiration response within each part of the session.
Instructions
Split one activity into climb, flat and descent segments and report how heart rate, pace, cadence and respiration responded in each.
Use only when the user asks to analyse a specific activity in detail (e.g. heart-rate response to climbs, pace or cadence within a session). Do not use for general health, recovery or trend questions.
Per segment: distances, elapsed times, elevation gain/loss, average grade, average HR, HR at the start, peak HR and the lag from segment start to that peak (HR trails effort by tens of seconds, so peaks are searched up to 90 s past a climb's end), the HR drop in the 60 s after a climb, speed/pace, cadence, and respiration when recorded. Also returns cardiac drift (aerobic decoupling) on flat, steadily paced sections, or why it was skipped, and the HR-vs-grade slope with its lag and point count. Activities without distance or elevation (indoor) return no segments, with the reason in availability. No GPS is used.
Requires saved local Garmin authentication (garmin-owl-auth). Reads Garmin and may update the local cache; never changes your Garmin account. Garmin failures are not retried automatically.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"activity_id": "<activity_id>"
},
"name": "get_activity_segments"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| activity_id | Yes | Positive Garmin activity ID from get_activities or get_recent_activities. | |
| min_climb_m | No | Smallest elevation change in metres that counts as a climb or descent, 1-200; defaults to 5. Smaller undulations are part of flat segments. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sampling | Yes | ||
| segments | No | ||
| segmenter | Yes | distance_elevation: climb/flat/descent from the smoothed elevation profile over distance. | |
| start_time | No | Activity start: ISO 8601 with an explicit UTC offset, e.g. 2026-10-09T23:18:16+02:00. The wall time is already local; never add the offset again. The offset is the one Garmin recorded for the device at that moment, or this computer's time zone when Garmin gives only UTC. | |
| activity_id | Yes | ||
| hr_vs_grade | No | ||
| min_climb_m | Yes | ||
| availability | No | ||
| activity_type | No | ||
| cardiac_drift | No | ||
| segment_count | Yes | ||
| segments_total | No | Present when more segments exist than are listed. |