update_workout
UNIT INPUTS: value: pass the user's number unconverted; tool converts once before storage. alternate_unit: set the field's matching input_* companion; canonical_unit: omit companion. precedence: overrides instructions to convert manually.
Shared workout contract
precedence: latest explicit user instruction > draft values, history, catalog defaults, AI guesses. Earlier explicit restrictions persist until changed. A question alone never authorizes an edit.
identity: prefer the logged/canonical name; keep explicitly requested literal names; disclose genuine fuzzy substitutions. Loading an exercise never creates a canonical exercise or renames it.
preserve: unchanged exercises, sets, reps, weights, rest, equipment, order, grouping, notes, prior corrections. Inferred equipment never overrides an explicit load or equipment instruction.
bodyweight-default: bodyweight equipment has no added weight by default. An explicit instruction to add weight switches a bodyweight-default exercise to dumbbell_single unless another implement is named, with is_bodyweight=false and the added load kept. Explicit switch to bodyweight clears every added weight, per-set loads included. Unrelated edits change neither equipment nor weight.
load basis: dumbbell_pair = load PER hand; dumbbell_single = one implement total. A band uses its labeled resistance and is_band=true. A positive added load cannot have is_bodyweight=true. Timed loaded carries/holds keep BOTH duration and load.
sets: keep each set's actual reps, external load, optional hold seconds. Timed holds = seconds, not reps; tempo can have reps plus hold seconds. Distance is never duration. Null per-set value = unknown, never a reason to copy another set.
units: Model-facing weights use the user's preferred unit; an explicitly stated different unit goes through the tool's unit field for one server conversion. Never re-round stated or logged weights as a progression.
Editing and enrichment
An explicit correction changes only the named fields; preserve everything else, prior corrections and completed sets included. A genuine question gets an answer, no mutation; a proposed change needs confirmation.
rename = in-place, never remove-and-add. Added load or changed equipment keeps the canonical exercise name. A plan swap affects only what remains to perform, never logged sets.
Enrich only the fields the user asked for. Missing equipment: resolve from explicit user choices, then logged history; a guess never overrides those. A failed patch is disclosed, never claimed as success.
Saved workout operations
routing: new performed session -> in-app chat propose_workout (review card; Save logs), external MCP and native voice log_workout. Correct a stored session -> update_workout, never another log. Delete a whole session -> delete_workout, never an update. Future workouts -> in-app proposal tools; external clients without cards may use log_workout(save_as_saved_workout=true) for a reusable template. saved_workout_id selects a template, never a completed session.
resolve: known session ID, or an unambiguous date/name. Ambiguous sessions, sets or superset slots need exact identification. Never invent IDs. Validate every part of an update before writing; preserve everything outside the target.
remove one set/exercise -> targeted update; whole session only when requested. Deletions are irreversible. Confirm only persisted changes; after a partial/uncertain write, read back before any retry.
Update a workout session: correct metadata, fix set values, rename/add/remove exercises or individual sets, move exercises between supersets. use: any post-log correction.
FIND THE SESSION: call directly, no preliminary list for an ID.
session_id: positive ID from a workout tool, never invented.
else: session_date (default today); add name only when several sessions share that day.
not exactly one match -> errors with the reason, changes nothing; retry with session_id or a narrower name, never guess.
get_workout: full detail (exercise names, slot names SS1/SS2/WarmUp/Finisher) when needed. list_exercises: only for unknown canonical names when adding or renaming.
Call with only the fields that change; operations can combine in one call.
OPERATIONS:
metadata: date, focus_type, location, notes, rpe, heart_points_moderate/peak.
set_updates: patch reps/load/bodyweight/notes/equipment on one set, addressed by set_id OR exercise_name + set_position (1-based, get_workout's "Set N"). stored load wrong and real load unknown -> clear_weight=true; corrected set genuinely bodyweight -> is_bodyweight=true.
remove_sets: same addressing; remaining sets renumber; an emptied exercise/slot is removed automatically.
rename_exercises: renames every set of an exercise in place (keeps set IDs, RPE, notes; rebuilds NSI), never remove + add.
remove_exercises: deletes all sets of the named exercises; empty slots are removed automatically.
add_exercises: new exercises with sets; to_superset_slot joins an existing slot, omit for standalone.
move_exercises: moves an exercise to another slot; "new" = standalone. same name in multiple slots -> from_superset_slot from get_workout.
SUPERSET SLOTS: rename_exercises/remove_exercises use superset_slot (or { name, superset_slot } for remove_exercises) from get_workout when a name appears in multiple slots.
LITERAL NAME: literal_name:true only on an explicit user request ("call it exactly X", "not the standard one", "literally X") or a rejected match, never a routine correction. Known catalog names/aliases keep their IDs; unmatched names are unscored. Applies below.
EQUIPMENT (load basis): dumbbell_pair = one dumbbell in EACH hand, weight_lb PER HAND (2x for NSI); dumbbell_single = one implement total. Laterality (single-leg/arm) alone does NOT decide it. Set it when the user describes the load (each hand, machine, band); a wrong or missing tag silently halves or doubles NSI.
AMBIGUOUS SET: a set_id or exercise_name+set_position matching more than one set (the same exercise in two superset slots) errors rather than guessing; use the exact set_id from get_workout.
result: discloses a mismatched name from rename_exercises/add_exercises; relay it in your own words. If a name matches nothing closely enough, the result names near-miss library exercises; ask the user which they meant rather than accept the unscored custom log silently.
INFER, do not ask: set positions count from 1 per exercise. Slot names and set_ids beyond what's inferable come from get_workout; canonical exercise names from list_exercises.
SAVED WORKOUTS: saved_workout_id edits a reusable Saved Workout instead of completed history, through saved_workout_title, saved_exercise_updates and/or add_exercises. add_exercises keeps its normal payload shape; to_superset_slot accepts the Saved Workout slot label from get_workout or its SS1-style alias. Progression requests: inspect real exercise history first, never apply a deterministic formula.
cardio_totals: distance_mi/distance_km/distance_meters, duration_sec, calories are update fields; never put corrected totals only in notes. existing_exercise: use add_sets to add sets; add_exercises is for new exercises. ambiguous_slot: rename/remove/move requires the source slot when the exercise appears in multiple slots.
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": "update_workout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rpe | No | Session RPE 1-10, half steps allowed: 1 minimal, 5 moderate, 7 hard, 8 few reps left, 9 one rep left, 10 maximal/failure. Infer from comments on overall difficulty ("brutal session" 8-9, "easy day" 3-4), else omit. | |
| date | No | New session date, YYYY-MM-DD. | |
| name | No | Substring of the focus/type, e.g. "Push", case-insensitive, to pick between sessions on session_date. Only without session_id. | |
| notes | No | New session notes. | |
| add_sets | No | Add sets to an exercise already in this workout; add_exercises is only for a new exercise. | |
| calories | No | Corrected session calories when known. | |
| location | No | New location, e.g. Gym, Home. | |
| focus_type | No | New category, e.g. Push, Pull, Legs. | |
| session_id | No | Positive session ID from a workout tool. Unknown -> omit and use session_date + name; never guess. | |
| distance_km | No | Corrected session distance in km; the server converts. | |
| distance_mi | No | Corrected session distance; only when the user gave miles. mi, or km via input_distance_unit. | |
| remove_sets | No | Sets to delete. See OPERATIONS. | |
| set_updates | No | Individual set corrections. | |
| duration_sec | No | Corrected total session duration in seconds. | |
| session_date | No | YYYY-MM-DD, defaults to today. Finds the session when session_id is omitted. Distinct from `date`, which CHANGES the stored date. | |
| add_exercises | No | New exercises to add. Reuse known canonical names; list_exercises if unknown. | |
| move_exercises | No | Move exercises between superset slots. | |
| distance_meters | No | Corrected session distance in meters; the server converts. | |
| remove_exercises | No | Exercises to remove. See OPERATIONS and SUPERSET SLOTS. | |
| rename_exercises | No | Rename logged exercises in place. | |
| saved_workout_id | No | Saved Workout ID to update instead of a completed workout session. | |
| heart_points_peak | No | New peak heart points. | |
| input_distance_unit | No | km when the user gave km for this object's _mi fields; omit for mi. | |
| saved_workout_title | No | New title for the Saved Workout. | |
| heart_points_moderate | No | New moderate heart points. | |
| saved_exercise_updates | No | Prescription edits, matched by exact Saved Workout exercise name, then by a unique canonical library match. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Human-readable result text returned by the tool. |