log_workout
UNIT INPUTS: never convert units yourself. For each canonical field below, pass the user's number exactly as stated when it is already in the canonical unit; when they gave the alternate unit instead, pass the same number unconverted and set the matching companion field so the tool converts once before storage. Omit the companion when the number is already canonical. This overrides any wording that asks you to do the arithmetic.
_lb fields: lb, or kg with input_weight_unit set.
_mi fields: mi, or km with input_distance_unit set.
_in fields: in, or cm with input_length_unit set.
_stated_g fields: g, or oz with input_mass_unit set.
_stated_ml fields: ml, or fl_oz with input_volume_unit set.
Log a complete workout session: exercises, sets, reps, weights, and session metadata. Use when the user describes finishing a workout, lists exercises performed, or asks to log training. A workout they have not done yet is not a log: use propose_workout for that.
EXERCISE NAMES:
Call list_exercises first; match each exercise to the closest canonical name. No reasonable match → use the name as stated. Don't ask before logging, match silently and log.
"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 is ONLY the exercise name, never reps/weights/sets — those go in the sets array.
LITERAL NAME: literal_name: true keeps the user's exact wording instead of the closest library match, skips the resolver, and gets no NSI score (no benchmark to compare an unmatched name against). Use for "call it exactly X", "not the standard one", "literally X", or a rejected match.
The result says when a name was matched to something other than what the user said. Relay it in your own words rather than repeating the line 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 is one dumbbell in EACH hand, weight_lb PER HAND (2x for NSI); dumbbell_single is one implement total. Laterality (single-leg/arm) does NOT decide this alone. Set it when the user describes the load (each hand, machine, band); a wrong or missing tag silently halves or doubles NSI. Values: barbell, dumbbell_pair, dumbbell_single, machine, kettlebell, bodyweight, band, cable, trx, other.
SETS:
"3 sets of 15 reps" → 3 set objects with reps: 15. "15/12/10" → 3 sets with reps 15, 12, 10.
Pure isometric holds (planks, dead hangs, wall sits) have no reps: "30 second plank" = { hold_length_sec: 30 }.
Tempo/pause work combines reps + weight_lb + hold_length_sec (seconds per rep) on the same set, never in notes.
Loaded carries (farmers carry, sled push, weighted plank) are one set per trip: hold_length_sec + weight_lb, omit reps unless a trip count is given. weight_lb is PER HAND for a two-implement carry, TOTAL for one implement. Distance has no column and is never a duration — put it in notes.
INFER — do not ask:
date: today, or from context
focus_type: from the exercises (bench/shoulders/triceps=Push, rows/pulldowns/curls=Pull, squats/deadlifts/lunges=Legs, mixed upper=Upper, everything=Full Body)
is_bodyweight: true for pull-ups, push-ups, dips, bodyweight squats; missing load alone does not mean bodyweight
superset_group: same integer for exercises done back-to-back or as a superset
slot_type: 'warmup' for prep at the start, 'finisher' for burnout/cardio at the end, 'working' (default) otherwise
RPE (Rate of Perceived Exertion) — 1-10 scale, half steps allowed (7.5, 8.5):
Session-level RPE: overall session difficulty. Infer from user comments like "brutal session" (8-9) or "easy day" (3-4). Optional.
Per-set RPE: how hard each individual set felt. Include only if the user explicitly mentions per-set effort or failure. Optional.
Scale: 1=minimal effort, 5=moderate, 7=hard, 8=few reps left, 9=one rep left, 10=maximal/failure.
ASK (single batched question) only if missing and not inferable: location, focus_type (list ambiguous), heart_points (tracker provides them but not mentioned).
RETURNS the new session's ID (as "[ID NN]"). Pass it to update_workout / delete_workout / get_workout / add_exercises for follow-ups in this conversation.
LIVE LOADS: for user-driven completed-workout logging, obvious bodyweight movements may omit load and are inferred as bodyweight. If a performed set normally uses external resistance, include that set's load. If the user did not provide it, ask one batched clarification before calling this tool. Only set load_unknown=true on a missing set when the user explicitly says they do not know, do not remember, or want to save without that load. Preserve partial known loads positionally; never copy one set's load to another or treat a missing external load as bodyweight.
SAVED WORKOUT MODE: when the user asks to save a workout for reuse, set save_as_saved_workout=true and pass the full prescription through this same tool. In saved mode the workout is NOT logged as completed history, and LIVE LOADS does not apply: prescribed weight may be omitted. To replace an existing Saved Workout, also pass saved_workout_id; the supplied prescription fully replaces its prior prescribed sets/reps/weights. Use saved_workout_title when the reusable name should differ from focus_type.
SIMPLE CARDIO / ENDURANCE LOGS:
Cycling, biking, bike rides, walking, and rowing/RowErg sessions are workouts, not runs. NEVER use log_run for them.
Log cycling/biking with focus_type: "Cycling", walking with "Walking", and rowing/RowErg with "Rowing".
A simple cardio workout does not need fake strength exercises. Omit exercises (or pass []) and put distance in the unit the user actually supplied: distance_mi, distance_km, or distance_meters. Put elapsed workout time in duration_sec and calories in calories when supplied.
NEVER do distance-unit arithmetic yourself. The server converts km/meters to stored miles exactly.
Do not call list_exercises just to represent a bike ride, walk, or rowing erg. The server stores these directly as workout_sessions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rpe | No | Session RPE, 1-10, half steps allowed: 5 moderate, 7 hard, 9 one rep left, 10 failure. Infer from comments about overall difficulty, or omit. | |
| date | Yes | YYYY-MM-DD. Default to today. | |
| notes | No | Session notes: how it went, PRs hit, how they felt. | |
| calories | No | Session calories for simple cardio when supplied by the user/device. | |
| location | No | Gym, Home, Outdoor. Infer from context or ask. | |
| exercises | No | Every exercise performed, in order. | |
| focus_type | No | Infer from the exercises: Push, Pull, Legs, Upper, Lower, Full Body, Cardio, Mobility. Ask only if genuinely unclear. | |
| distance_km | No | Session distance in kilometers. Server converts it to storage units; do not convert it yourself. | |
| distance_mi | No | Session distance in miles for simple cardio. Use only when the user supplied miles. In mi, or km with input_distance_unit set. See UNIT INPUTS. | |
| duration_sec | No | Total session duration in seconds for simple cardio when known. | |
| distance_meters | No | Session distance in meters. Server converts it to storage units; do not convert it yourself. | |
| saved_workout_id | No | Existing Saved Workout ID to replace in saved mode. Omit to create a new Saved Workout. | |
| heart_points_peak | No | Peak-intensity heart points, if mentioned. | |
| input_distance_unit | No | Set to km when the user gave km for the _mi fields in this object. Omit when they are already mi. | |
| saved_workout_title | No | Optional reusable workout name in saved mode. Defaults to focus_type. | |
| heart_points_moderate | No | Moderate-intensity heart points, Google Fit or equivalent, if mentioned. | |
| save_as_saved_workout | No | True when this payload is a reusable Saved Workout prescription, not a completed workout. Defaults to false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Human-readable result text returned by the tool. |