calculate_pace
Work out a pace, finish time, or distance from the other two inputs and return split times along the way. Use it for race targets, pace alerts, and checkpoints without arithmetic slips.
Instructions
Work out a pace, a finish time or a distance from the other two, with the split times along the way.
USE THIS FOR EVERY SUCH NUMBER YOU QUOTE: a target pace for a goal time, the finish time a pace gives, the clock at each kilometer of a race, the speed for a pace alert. Do not do this arithmetic yourself; it is where slips happen (a half marathon is 21.0975 km, not 21).
Give exactly two of the three: a distance (race or distance_m), a
time, a pace. The third is worked out.
This converts between numbers. It does not say whether a pace is realistic for the athlete; judge that from their training (get_recent_runs, get_training_summary) and the coaching playbook.
Returns:
- solved_for: "pace", "time" or "distance", whichever was left out.
- distance_m, and distance in the athlete's unit ("21.1 km").
- time ("1:45:00") and time_s.
- pace_per_km and pace_per_mile ("4:59", "8:01"), each rounded to the
second, with pace_per_km_s and pace_per_mile_s to one decimal.
Quote the one matching the athlete's units.
- speed_mps: the same pace as meters per second, the form a workout's
speed alert takes (create_workout).
- splits: one row per mark in running order, mark ("5 km", "Half",
"Finish") and the time on the clock there at an even pace. A whole
km or mile that is also a named checkpoint carries checkpoint
("5K"); one that is the finish carries finish: true. Marks between
two whole units carry distance_m. Split times are computed from
the exact pace, so they add up to the finish time even where the
rounded pace would not.
On bad input: {"error": "..."} saying what to change.
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": "calculate_pace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pace | No | Pace as "M:SS" per kilometer, or per MILE when units is "imperial" ("4:58"), or a number of seconds per that unit. | |
| race | No | A standard race distance, exact to the meter. Use this OR distance_m, not both. | |
| time | No | Total time as "H:MM:SS" or "MM:SS" ("1:45:00", "24:30"), or a number of seconds. | |
| units | No | The athlete's `units` from get_plan_context. Decides whether `pace` is read per km or per mile, and whether splits are per km or per mile. | metric |
| splits | No | "all" = every km or mile plus the checkpoints and the finish; "checkpoints" = only 5K, 10K, half, 30K and the finish; "none" = no table. | all |
| distance_m | No | Distance in METERS, for anything that is not one of the standard races. |