Skip to main content
Glama

PB-Runner: Running Coach

get_runs

Read-only

The user's runs, newest first — the individual run records, each with its summary metrics. Use this when the user wants specific runs or you need the raw records. For aggregate questions prefer the purpose-built tools: 'how do my easy runs compare' / 'easy vs tempo' -> compare_runs; a metric's trend over time -> get_progression; an overall rollup -> get_training_summary; one run vs its peers -> compare_to_baseline. Filter by workout type (an untyped run matches by its run_category) and/or distance band (named-distance mapping is in the server instructions). Report figures directly and confidently. A metric flagged 'limited' -> at most a brief 'limited data' half-sentence, never hedge/refuse/lecture ('limited' is coverage-driven — gaps in the recorded HR stream — and appears on genuine Apple-Watch runs too, so it does not mean the run is an import or the data untrustworthy); 'not_recorded' -> excluded, never zero; no sample-size refusals (analyse 2 runs or 20). Each run/split carries cadence_spm (steps/min) — report it like any metric, same conventions. Each run summary also carries active_energy_kcal — total active energy burned for the workout (kcal); report it directly when asked, null when the watch didn't record it, never zero. elevation_gain_m/elevation_loss_m are canonical, with elevation_source ∈ 'dem'|'barometric'|'gps'|'unavailable': terrain-model (DEM) derived when 'dem' (highest confidence, the default where coverage exists), barometric when 'barometric', GPS-derived when 'gps' (may be null on older imported rows — gain/loss null, never zero); 'unavailable' means no canonical elevation could be resolved and gain/loss are null (never zero). elevation_*_gps is the GPS diagnostic — report canonical elevation plainly, mention the source only if asked. Each run summary also carries gap_s_per_km — grade-adjusted pace (metric s/km): the flat-equivalent pace, so an uphill run shows a FASTER gap_s_per_km than its raw pace_s_per_km, a downhill run slower, flat ≈ equal; gap_source is 'dem' (high-confidence terrain) / 'gps' (lower-confidence fallback) / null when unavailable (gap_s_per_km is null too — never zero). Each run summary also carries decoupling — aerobic decoupling (Pa:HR, grade-adjusted): pa_hr_pct is how much HR drifted up relative to pace over the run's two halves — lower is better, under ~5% is well-developed aerobic fitness; computed over active (moving) time with pauses excluded, so a stop-start run is scored on its running only; null on interval runs and on runs with under ~10 min of moving time (never zero); a value from one watch is not comparable 1:1 with another watch's value on the same run. best_efforts is the fastest rolling effort at each of 1k/1mi/3mi/5k/6mi/10k within this single run (each present only if the run is at least that long); the mile rungs are the race equivalents of the km rungs (3mi ≈ 5K, 6mi ≈ 10K) — present the km rungs to metric athletes and the mile rungs to imperial. hr_zones is time-in-zone (Z1–Z5) from the athlete's max HR — seconds + pct per zone; null when max HR is unknown. Each run carries run_category (coarse kind) + run_name (the structured session name on guided runs, or the Garmin Connect title on CSV-imported runs; null otherwise); filter with category/name to group runs of a kind (e.g. category='tempo' for all tempos, name='Pyramid' for all pyramid sessions). A run with walk_paced: true is a walk, not a slow run. Each run also carries recording_profile (full = HR plus a body-worn sensor form metric — power / GCT / vertical oscillation; gps_hr = HR but no sensor form metric; gps_only = no HR, a phone/GPS run. A Garmin CSV import reads gps_hr (coarse HR, device cadence/stride, no route; gps_only when the export has no HR column) and cannot read full; the converse does not hold — a watch run that recorded no power/GCT/VO also reads gps_hr, so never infer an import from the profile alone. See the imported-runs guidance before explaining why form metrics are absent) and subjective (the athlete's own perceived_effort 1-10, tiredness_after 1-5, reserve 1-5 — null if not entered). Each run also carries distance_provenance — 'recorded' = device-measured; 'corrected' = a treadmill run corrected to the belt's number; 'manual' = logged from the user's own description, distance as they reported it. Corrected and manual runs never set personal bests and never feed Race Fitness, but count toward volume, consistency and schedule tick-off. On a manual run every metric reads not_recorded and recording_profile is not meaningful — never describe a manual run as a GPS or phone run. A run carrying duplicate_of is a second record of the run it names — two apps that both wrote it to Apple Health, or one run recorded on two watches at once (a Garmin watch running PB-Runner alongside an Apple Watch, which never passes through Apple Health). Treat the pair as ONE run and never sum both. The marker says only which copy the totals count; it is chosen by a tie-break, not by accuracy or richness, so when the two copies disagree about what happened it does not tell you which one is right — read both before judging a session, say which record you read, and never report a session as failed from one copy alone. The run it names can sit just beyond this page; if it is not in the list, count the visible copy once, and fetch the named one with get_run only if you need its detail. Each run carries source_app / source_bundle_id / recorded_by_us — which app wrote the record (not which device). Two runs with overlapping times are almost always one physical run recorded twice; read source_app before comparing them. plan_matched marks the copy the athlete's schedule was ticked against.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_runs"
  }
}

Input Schema

NameRequiredDescriptionDefault
nNoHow many runs (1-50, default 10)
nameNoFilter to a specific structured session name (e.g. 'Pyramid', 'Fartlek').
typeNoOptional workout_type: just_a_run | easy | tempo | long | race | intervals | trail; an untyped run matches by its run_category
categoryNoFilter to one training category: easy|tempo|intervals|long|race|just_a_run|trail (e.g. 'all my tempos').
max_distance_mNoOptional maximum canonical distance (metres)
min_distance_mNoOptional minimum canonical distance (metres)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnly/destructive/openWorld, so the description carries the full domain burden and does so extensively: duplicate_of pairs must be counted once, distance_provenance determines PB/Race Fitness eligibility, manual runs read not_recorded, recording_profile cannot prove an import, overlapping times imply one physical run, and elevation/gap/decoupling null-vs-zero semantics are spelled out. This is far beyond what the annotations supply.

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

Conciseness2/5

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

The purpose and routing are front-loaded well, but the description is an enormous unbroken block covering every field's semantics. Much of it is useful, yet the density and lack of structure make it hard to scan and expensive to load; several field-by-field explanations could be tightened or deferred to output documentation.

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?

For a complex, schema-rich read tool with no output schema, the description covers return-value semantics comprehensively — best_efforts rungs, hr_zones, decoupling, gap, elevation sources, subjective fields, and provenance — so an agent knows exactly what each record contains and how to interpret it.

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; the description adds genuine nuance by explaining that an untyped run matches by run_category, that named-distance mapping lives in server instructions, and that category/name can be used to group runs of a kind. Some of this overlaps the schema text, keeping it just short of 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?

The opening sentence states a specific verb and resource ('the user's runs, newest first — the individual run records') and immediately distinguishes this from aggregate siblings by naming compare_runs, get_progression, get_training_summary, and compare_to_baseline with the questions each answers. An agent can route correctly without opening another 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 when-to-use ('specific runs or raw records') and when-not ('aggregate questions prefer the purpose-built tools'), with concrete example questions mapped to each alternative. It also states reporting conventions for limited/not_recorded data and sample-size refusals, leaving little to inference.

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