Skip to main content
Glama
cambroussard9

trail-factors

mile_splits

Compute per-mile or quarter-mile running-only pace, heart rate, elevation gain/loss, and time by gait, with Garmin laps alongside for cross-check.

Instructions

Per mile (or unit="quarter"): running-only pace, HR, DEM gain/loss and time by gait, with Garmin's own laps beside it for cross-check.

Args:
    run: run_id, activity_id or Garmin file id. Empty means the latest run.
    unit: "mile" (default) or "quarter".

BOUNDARIES from the device odometer, interpolated exactly at each mile
(the windowed-best rule), never from 30 s bins; across a standing stretch
the LAST instant at that distance. The final unit is a PARTIAL with its
real length. A unit crossing a recording gap over 20 s is FLAGGED
(`contains_gap` / `boundary_in_gap`), not refused.

RUNNING-ONLY PACE: rwd_run splits intersected with the unit, stopped time
removed. A walk break inside a mile is excluded from pace and counted in
`time_walking_s`. `hr_running` (PRIMARY) is time-weighted over the same
running overlap; `hr_all_gaits` covers the whole unit. Both RAW, no lag.

Gain/loss from the smoothed DEM profile, in m and ft; with no DEM they are
null and `elevation_reason` says why. `garmin_laps` are Garmin's laps AS
RECORDED -- only distance-triggered ones are miles, and their pace
includes walking -- and are never substituted for ours.

Input Schema

NameRequiredDescriptionDefault
runNo
unitNomile

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so thoroughly: boundary interpolation rules, partial final units, gap flagging, running-only pace excluding stopped/walking time, HR averaging semantics, elevation null reasons, and that Garmin laps are never substituted. These are meaningful behavioral disclosures beyond the schema.

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?

The description is front-loaded with the main output and then gives argument and behavioral details. It is longer and denser than ideal, with some repetition around Garmin laps, but most sentences add necessary semantic value for a complex splits tool.

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?

Given the complex per-mile computation, two undocumented schema parameters, no annotations, and a present output schema, the description is complete enough for correct invocation. It covers parameter meanings, edge cases, and field semantics without needing to repeat the output schema.

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 must compensate. It fully explains both parameters: `run` accepts run_id, activity_id, or Garmin file id and empty means latest run; `unit` accepts "mile" or "quarter" with mile as default.

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 clearly defines a per-mile (or quarter-mile) running-splits output with pace, HR, elevation gain/loss, and gait time, plus Garmin laps for cross-check. It is specific about the resource and computed fields, but does not explicitly name sibling tools or state how it differs from adjacent metrics tools.

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

Usage Guidelines3/5

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

Usage is implied by the description: per-mile running splits with cross-check against Garmin laps, and `run` empty means latest run. However, it gives no explicit when-to-use/when-not guidance and does not route the agent away from alternatives such as segment_history, session_series, or basic_metrics.

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