Skip to main content
Glama

PB-Runner: Running Coach

get_run_streams

Read-only

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

NameRequiredDescriptionDefault
run_idYesThe run's backend id
metricsNoChannels 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.
resolutionNoGrid: '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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already mark it read-only and closed-world, but the description goes well beyond them: hard caps (600 points/channel, 2400 total budget), budget sharing across channels, the authoritative `note` flag on coarsening/striding, null discipline (null not 0/[]), and the non-Apple/Garmin degraded-payload case being valid rather than an error. That is exactly the behavioral context an agent needs to avoid misreading results.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the recommendation-then-alternative structure and organized into return shape, caps, metrics and null rules. It is, however, long and dense for a three-parameter tool, with near-duplicate null statements ('absent metric is null in BOTH...' vs 'no stored samples returns a valid all-null payload') that could be merged.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description carries the full burden and does: it enumerates `insights` fields, explains the drift slope semantics per minute and per metric sign, describes the cross-stream `narrative`, and specifies the `streams` array format. Nothing an agent needs to interpret the response correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: pace is derived from 1000/speed, cadence requires speed AND stride, 1s is opt-in only, and requesting 5+ channels lowers the per-channel cap. It does partly restate the allowed-metric list and default set that the schema already documents, which keeps it off a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('get time-resolved per-stream data for a single run') with an explicit scope boundary ('No GPS/route — metric channels only'), and names the sibling get_run as the summary alternative. An agent can distinguish it from get_run and the coach_* variants without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit sequencing: 'Use get_run ... FIRST; reach for get_run_streams only when you need the time-resolved shape of a single run', followed by concrete motivating questions (where pace cracked, HR climbing, cadence decay). It also routes back to get_run for rigorous decoupling when the narrative is non-null.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources