log_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.
COMPLETED WORKOUTS, ANY ACTIVITY:
real exercises/sets: provide as usual; session totals and activity metrics can ride in the SAME log_workout call.
activity description only (walking, yoga, swimming, a kettlebell circuit, strength, HIIT, cycling, etc.): focus_type + reported session details; OMIT exercises or pass []. no fake exercises or sets. Never invent exercises, reps, weights, splits, heart rates or calories.
notes: reported context, uncertain durations included (e.g. "15-20 minutes, light intensity"). unknown numeric fields stay unset; never turn a range into false precision.
estimated=true: ONLY when numeric values really are estimates; zero sets does not imply it.
focus_type: walking = "Walking"; cycling/biking = "Cycling"; rowing/RowErg = "Rowing"; other activity names as stated.
log_run: the richer route for completed runs with known distance+duration, running splits or planned runs. Never send a walk, ride or row to log_run.
distance_mi/distance_km/distance_meters: alternatives; send the unit the user gave. The server converts, never convert it yourself.
duration_sec: total workout/moving seconds, not a set or a repetition.
HR, power, cadence, elevation, laps/segments: only when reported.
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.
Completed-workout logging
Record only what the user performed or a specifically referenced session proves. Never invent completed sets, reps, weight, RPE, duration, start time or exercises. A historical load may be offered for confirmation, never silently inserted into a past log.
copy an earlier workout: copy its full actual sets, loads, order and grouping, then apply only the stated correction. Imported session: keep the wearable anchor; its aggregate data is not evidence of individual sets.
Missing actual values stay unknown. An emitted completed-session card must be reviewed/saved before you claim it was logged.
Log a complete workout session: exercises, sets, reps, weights, session metadata. use: the user describes finishing a workout, lists exercises performed, or asks to log training. Reusable template: see SAVED WORKOUT MODE.
EXERCISE NAMES:
Reuse known canonical names, else call list_exercises and match each exercise to the closest canonical name. match -> canonical name + its [id] as exercise_id. no reasonable match -> name as stated, no exercise_id. Match silently and log; don't ask first.
"Chest press" (machine) and "bench press" (barbell) are DISTINCT: pass the user's term through so the resolver's aliases pin the right one.
name = the exercise name only; reps/weights/sets go in sets.
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.
The result says when a name was matched to something other than what the user said; relay it in your own words, not verbatim. 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.
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.
SETS:
"3 sets of 15 reps" -> 3 set objects, reps 15. "15/12/10" -> 3 sets, reps 15, 12, 10.
isometric hold (plank, dead hang, wall sit): no reps. "30 second plank" = { hold_length_sec: 30 }.
tempo/pause: reps + weight_lb + hold_length_sec (seconds per rep) on the same set, never in notes.
loaded carry (farmers carry, sled push, weighted plank): one set per trip, hold_length_sec + weight_lb; omit reps unless a trip count is given. weight_lb = PER HAND for two implements, TOTAL for one.
circuit station (run/ride/swim/row/walk): distance_meters and/or duration_sec PER ROUND on its set, not reps or hold seconds.
INFER, do not ask: date; superset_group; slot_type; location (from context, else omit); focus_type from the exercises (bench/shoulders/triceps=Push, rows/pulldowns/curls=Pull, squats/deadlifts/lunges=Legs, mixed upper=Upper, everything=Full Body). heart_points: reported values only. Missing external load: follow LIVE LOADS.
RPE: 1-10, half steps allowed. Scale and inference: see the rpe field. Per-set rpe only when the user states per-set effort or failure.
RETURNS the new session ID as "[ID NN]"; pass it to update_workout / delete_workout / get_workout for follow-ups in this conversation.
LIVE LOADS: user-driven completed-workout logging only.
obvious bodyweight movement: may omit load; inferred as bodyweight.
performed set that normally uses external resistance: include its load; not given -> ask one batched clarification before calling this tool.
load_unknown=true on a missing set: only when the user explicitly says they do not know, do not remember, or want to save without that load.
partial known loads: preserve positionally; never copy one set's load to another, never treat a missing external load as bodyweight.
SAVED WORKOUT MODE:
in-app chat: propose_workout for new workout plans, whether to save or start; discover it if needed.
external clients without cards: save_as_saved_workout=true + the full prescription through this same tool.
saved mode does NOT log completed history; LIVE LOADS does not apply, prescribed weight may be omitted.
replace an existing Saved Workout: also pass saved_workout_id; the supplied prescription fully replaces its prior sets/reps/weights.
saved_workout_title: when the reusable name should differ from focus_type.
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": {
"date": "<date>"
},
"name": "log_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 | Yes | YYYY-MM-DD; default today. | |
| notes | No | Session notes: how it went, PRs hit, how they felt. | |
| avg_hr | No | Reported average heart rate (bpm). | |
| max_hr | No | Reported maximum heart rate (bpm). | |
| splits | No | Actually reported laps/splits, same structure as the in-app run logger; never invent. | |
| calories | No | Reported session calories; never invent. | |
| location | No | Gym, Home, Outdoor. Infer from context, else omit. | |
| segments | No | Actually performed intervals/blocks, same structure as the in-app run logger; never invent. | |
| estimated | No | True only when a saved numeric value is an AI approximation; describe its source/range in notes. | |
| exercises | No | Only the actual exercises/sets provided by the user. For a session-level log, omit or use []. | |
| intensity | No | Qualitative effort as reported (does not manufacture an RPE). | |
| focus_type | No | Specific completed activity (Walking, Cycling, Yoga, Kettlebell Circuit, Full Body, etc.). Infer from user wording; omit only if notes describe the activity. | |
| start_time | No | Local HH:MM when explicitly supplied; otherwise omit. | |
| avg_power_w | No | Reported average power in watts (e.g. cycling). | |
| distance_km | No | Session distance in kilometers. Server converts to miles. | |
| distance_mi | No | Session distance, when the user gave miles. mi, or km via input_distance_unit. | |
| elapsed_sec | No | Elapsed seconds including pauses; omit if unknown. | |
| max_power_w | No | Reported peak power in watts. | |
| duration_sec | No | Total workout or moving seconds (convert stated minutes); not a set duration. | |
| avg_cadence_rpm | No | Reported cycling/rowing cadence, revs/min. | |
| avg_cadence_spm | No | Reported running/walking cadence, steps/min. | |
| distance_meters | No | Session distance in meters. Server converts to miles. | |
| elevation_gain_m | No | Reported elevation gain in meters. | |
| saved_workout_id | No | Saved mode: existing Saved Workout ID to replace; omit to create a new one. | |
| heart_points_peak | No | Peak-intensity heart points, only if reported. | |
| avg_pace_sec_per_mi | No | Reported average seconds per mile. Never invent a pace. mi, or km via input_distance_unit. | |
| input_distance_unit | No | km when the user gave km for this object's _mi fields; omit for mi. | |
| saved_workout_title | No | Saved mode: reusable workout name; defaults to focus_type. | |
| heart_points_moderate | No | Moderate-intensity heart points (Google Fit or equivalent), only if reported. | |
| save_as_saved_workout | No | true = this payload is a reusable Saved Workout prescription, not a completed workout; default false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Human-readable result text returned by the tool. |