propose_profile_update
Stage an athlete-profile change for the user to confirm. Pass ONLY fields the user explicitly provided — never invent values. Returns a current->proposed diff (scalars in diff, manual personal bests in personal_bests_diff), any rejected fields, warnings (accepted values the user should double-check, each with the reason), and a confirmation_token. Show the diff AND any warnings to the user and, ONLY after they explicitly confirm, call commit_profile_update with the token. Scalar fields: date_of_birth (YYYY-MM-DD), sex, max_hr_bpm (100-240, a whole number — a max HR the user sets is used even below their highest recorded heart rate, and warnings then names that peak's value, date and run so they can check the value isn't too low before they confirm; null clears it, returning to the recorded peak), resting_hr_bpm (30-100 — used only when their watch or Apple Health has no resting-HR reading), vo2_max_ml_kg_min (20-90, ml/kg/min — for a device that never recorded one: a watch or Apple Health VO2max reading, when one exists, is used instead), goal, target_race, target_race_date (YYYY-MM-DD), training_phase (base|build|peak|taper|offseason), units (metric|imperial). STRUCTURED GOAL: goal_time_s + goal_distance_key encode a target finish time at a PB-ladder distance — YOUR job is the structuring: when the user states a time goal in words, translate it (e.g. "sub-40 10K" -> goal_time_s 2400 + goal_distance_key "10k"; "3:30 marathon" -> goal_time_s 12600 + goal_distance_key "marathon"). The two are ALWAYS a pair: pass both to set a goal, or BOTH explicitly null to clear it — one without the other is rejected. goal_distance_key one of 1k|1mi|5k|10k|half|marathon; goal_time_s must be plausible for the distance (the manual-PB band with the slow end widened x1.5 — an ambitious-but-slow goal is fine, a typo is not). This structured pair drives the in-app goal-convergence chart and prediction; the free-text goal stays for narrative context — set both when the user states a time goal. RESPECT PROVENANCE: get_athlete_profile returns goal_source — if it is 'athlete' the user set this goal themselves in the app, so do NOT overwrite or clear it unless they explicitly ask. ALSO accepts personal_bests: an array of {distance_key, time_seconds, set_on?} to hand-enter the user's race bests (e.g. a 5K run on another watch before they used this app) — distance_key one of 1k|1mi|5k|10k|half|marathon, time_seconds the finish time in seconds, optional set_on (YYYY-MM-DD). A manual PB is merged BEST-OF with the app-computed best (the faster of the two wins per distance), and feeds VDOT / Critical Speed / race predictions. Use this whenever the user tells you a race result the app doesn't already know.
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": "propose_profile_update"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sex | No | ||
| goal | No | ||
| units | No | ||
| max_hr_bpm | No | Max HR (100-240 bpm, a whole number), or null to clear a set value. A set value is used even below the highest recorded peak (see warnings); null returns to that peak. | |
| goal_time_s | No | Structured goal: target finish time in seconds (e.g. sub-40 10K -> 2400). MUST be paired with goal_distance_key; pass both null to clear the goal. | |
| target_race | No | ||
| date_of_birth | No | ||
| personal_bests | No | Hand-entered personal bests, merged best-of with the app-computed bests; feed VDOT/CS/predictions. | |
| resting_hr_bpm | No | Resting HR (30-100 bpm, a whole number). | |
| training_phase | No | ||
| target_race_date | No | ||
| goal_distance_key | No | Structured goal distance: 1k | 1mi | 5k | 10k | half | marathon. MUST be paired with goal_time_s; pass both null to clear the goal. | |
| vo2_max_ml_kg_min | No | Manual VO2max (20-90 ml/kg/min); used only when there is no watch or Apple Health VO2max reading. |