Loki Docs
Tools › Workouts › Start a workout

Start a workout

start_workoutAdds
What it does
Adds a new record and leaves what you had alone. Safe to retry: the same call twice changes nothing more.
Permission
Workouts, change workouts:write

What your assistant is told

Start a new workout session for the calling user. Optionally seed it from a template (the template's exercises are copied in, ready to log sets against). Fails if a workout is already in progress — call end_workout first.

Parameters

  • nametext, requiredName for the session, e.g. "Thursday Pull".
  • fromTemplateIdid, optionalOptional template UUID (from list_workout_templates) to seed exercises from.
  • notestext, optionalOptional free-text note for the whole session.
  • idempotencyKeyid, optionalOptional UUID you generate for THIS write, so retrying it is safe. Pass the SAME key when you retry a call that timed out or errored with an unclear outcome: the server returns the record the first attempt created instead of writing a second one. Generate a fresh key per distinct write — reusing one is how you'd silently skip a second, genuinely new entry. Omit it and every call writes a new record.
  • 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.