Skip to main content
Glama

PB-Runner: Running Coach

compare_to_baseline

Read-only

Compare one run to a baseline set of the user's runs: today's pace/HR/cadence vs the baseline averages + delta + how many runs matched. By default the baseline is the user's recent runs of the SAME TYPE and SIMILAR DISTANCE (±20% of this run; last n, default 5, the subject excluded) — a like-for-like comparator. An untyped subject uses its run_category. Override with baseline: { type: a specific tag, or "all" for every type; min_distance_m; max_distance_m — an explicit band overrides the ±20% default }. Absent metrics are excluded from the average, never counted as zero. Runs under 1 km are excluded from the baseline. Walk-paced runs are left out of the baseline. today may carry a clock_contradiction block: the subject run is never quarantined, because it is the run you were asked about, but when its own two clocks contradict each other its pace is priced on a duration its wall clock cannot support and every delta here is meaningless — say that rather than read the comparison.

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": "compare_to_baseline"
  }
}

Input Schema

NameRequiredDescriptionDefault
nNo
run_idYes
baselineNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnly/destructive annotations, it discloses exclusion rules (sub-1km runs, walk-paced runs), the null-handling rule ('absent metrics excluded... never counted as zero'), and the clock_contradiction caveat that tells the agent to report meaningless deltas rather than read them. These are non-obvious behaviors an agent could not infer from structured fields.

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?

It is one dense paragraph, but it is well ordered: purpose first, then defaults, then override mechanism, then caveats. Every sentence carries information; the only cost is length, which slows scanning relative to a bulleted structure.

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 tool with a nested object, 0% schema coverage and no output schema, the description covers both inputs and the shape of the result (averages, delta, match count), plus the diagnostic caveat. Nothing an agent needs to call it correctly or interpret its answer is missing.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden and does: it defines n (last n, default 5, subject excluded), the nested baseline.type (specific tag or 'all'), and min/max_distance_m as an explicit band overriding the ±20% default. It also clarifies run_id as the subject run whose defaults are derived.

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

Purpose4/5

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

The description opens with a precise verb and resource: 'Compare one run to a baseline set of the user's runs,' and enumerates what is compared (pace/HR/cadence vs baseline averages + delta + match count). It does not name or distinguish itself from the sibling 'compare_runs', so an agent cannot rule out the alternative from this text alone.

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

Usage Guidelines4/5

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

It clearly explains the default comparison mode (same type, ±20% distance, last n=5, subject excluded) and the conditions for overriding via the baseline object, plus all-or-nothing 'all' type, so the agent knows how to get a like-for-like vs a custom-band comparison. It stops short of stating when to use this instead of another comparison tool.

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