Loki Docs
Tools › Workouts › Update a workout

Update a workout

update_workoutChanges
What it does
Changes or deletes something you had. Your assistant can ask you to confirm first. Safe to retry: the same call twice changes nothing more.
Permission
Workouts, change workouts:write

What your assistant is told

Edit a workout session's metadata — its name, notes, the date it was performed, and/or when it ended — never its logged sets. Every field is optional: pass only the one you want to change; a null leaves the others untouched (PATCH semantics), and a blank/empty notes clears the note. Allowed on ENDED sessions too, on purpose: this is how you add a reflective note after the fact ("felt strong, slept well"), fix a mistyped title, or correct when a session actually started and finished — without falsifying the logged sets. endedAt works only on an ended workout; to end the in-progress one at a past time use end_workout with endedAt. Do NOT use this to change the sets — for that use log_set, update_set, or delete_set. Session id comes from list_workouts / get_workout. Returns the updated session.

Parameters

  • idid, requiredSession UUID from list_workouts / get_workout.
  • nametext, optionalNew session name. Omit (null) to leave it unchanged; if supplied it must not be blank.
  • notestext, optionalNew free-text note (capped at 2000 chars). Omit (null) to leave it unchanged; pass an empty string to clear it.
  • datedate and time, optionalMove the workout's START to a different date/time — for correcting when a session actually happened. On an ended workout this also moves its end to the same instant (zero duration) unless you pass endedAt in the same call. Omit (null) to leave it unchanged; cannot be in the future.
  • endedAtdate and time, optionalWhen an ENDED workout actually finished, as an absolute date/time — for fixing a duration that is wrong because the workout was ended late or early. Omit (null) to leave it unchanged; cannot be in the future or before the start. Fails on an in-progress workout.
  • clientHandletext, optionalOptional client_handle from list_clients to run this tool against a coached client's data instead of your own. Omit (or pass null) for your own data — the legacy default.