get_run_streams
Raw streams, the PB way — derived insight first, downsampled tiers (1/5/10s), raw on demand. Use get_run for the shaped summary (pace, GAP, decoupling, zones, splits, segment_summary) FIRST; reach for get_run_streams only when you need the time-resolved shape of a single run — where pace cracked, how HR climbed minute-by-minute, whether cadence decayed late. Returns per-stream insights (samples/mean/min/max/start/end/drift — drift is the least-squares slope per MINUTE: HR + = cardiac drift, pace + = slowing, cadence − = decaying) plus a short cross-stream narrative to lead with when something noteworthy fired — HR-drift-vs-pace, pace fade, cadence decay; null on an unremarkable run, not an error (it POINTS BACK to get_run for rigorous decoupling), and streams (downsampled [tSec, value] arrays). NEVER a raw dump: resolution defaults to 'auto' (coarse — 5s for short runs, else 10s; 1s is opt-in only), every channel is hard-capped at 600 points with a 2400-point total budget shared across channels (requesting 5+ channels lowers the per-channel cap), and a note flags any coarsening/striding — the note is authoritative: resolution_s echoes the REQUESTED grid even when striding widened the effective spacing. Metrics (default heart_rate, pace, cadence, power): heart_rate, pace, speed, cadence, power, stride, vertical_oscillation, ground_contact_time — pace is derived (1000/speed), cadence is derived (needs speed AND stride). Null discipline: an absent metric is null in BOTH insights and streams (never 0, never []); a run with no stored samples returns a valid all-null payload + note, NOT an error. A run imported from a non-Apple device (e.g. Garmin via Apple Health) may return only a coarse heart-rate line (a few dozen points across the whole run) with pace/cadence/power null — that is the full extent of what the source exported, not broken sampling; the 'no streams' note fires only when every channel is null. No GPS/route — metric channels only.
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": {
"run_id": "<run_id>"
},
"name": "get_run_streams"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | Yes | The run's backend id | |
| metrics | No | Channels to return (default heart_rate, pace, cadence, power). Allowed: heart_rate, pace, speed, cadence, power, stride, vertical_oscillation, ground_contact_time. Unknown entries are dropped; if all are unknown the default set is used. | |
| resolution | No | Grid: '1s' | '5s' | '10s' | 'auto' (default). 'auto' biases coarse and never returns 1s; an explicit finer grid is honoured but coarsened (with a note) if it would breach the 600-point per-stream cap. |