get_activity_intervals
Extract the work reps of an interval session from a Garmin activity, excluding warm-up and cool-down, to see how fast the intervals were actually run.
Instructions
Get the work reps of an interval session, with warm-up and cool-down excluded.
activity_id is the numeric id from list_recent_activities. Use this
instead of get_activity_laps when you need what the reps were actually run
at: it answers "how fast were the intervals", not "how fast was the run".
Returns a JSON object with "classified_by" — typed_splits (Garmin's
recorded workout structure, preferred) or garmin_intensity (the lap
intensity field, used only when an activity has no typed structure) — so
the caller can see how certain the classification is. "reps" holds one
entry per work rep and per rest between them — read is_work_rep rather
than assuming every entry is a rep — each with distance_m,
duration_s, pace_per_km, avg/max HR. "work_summary" aggregates the work
reps only (count, total distance, average/fastest/slowest pace, pace
spread, HR). "excluded" lists what was dropped and why.
An unstructured run returns zero work reps rather than one rep covering the whole activity: the activity's own average pace is never a rep pace.
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_intervals"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| activity_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |