write_update_workout
Edit a logged workout's date, time, duration, name, note, body weight, or exercises while recalculating volume, best weights, and PR badges.
Instructions
Change a logged workout: its date, start time, duration, name, note, body weight, or its exercises. entries, when given, is the new list in the format read_workout returns: an exercise the workout had keeps what is left out (its sets, note, superset, routine; null removes a note, superset or routine), a new one needs its sets. A new date keeps the time of day and the length. Volume, best weights and PR badges are worked out again as the app does after an edit; a remembered working weight that came from a removed set falls back to the best left in history. A workout from before ids (read_workouts shows it as "YYYY-MM-DD|") takes that key as its id, as in the app. An edit that changes nothing writes nothing. No future dates or times: the workout must have ended by now.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Workout id as read_workouts shows it (a workout from before ids: its day and start, "YYYY-MM-DD|<start>") | |
| date | No | Date YYYY-MM-DD (the profile’s local calendar day) | |
| name | No | ||
| note | No | Empty removes the note | |
| start | No | ||
| entries | No | ||
| bodyWeight | No | null removes it | |
| durationMin | No |