Save a workout
trainrec_save_workoutLogs a new workout, or replaces an existing one given its id and version: the whole workout as it should now be, so anything left out is removed. Sets default to done; planned sets for a later day have done: false. The change shows in the person's app with Undo.
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": {
"name": "<name>",
"exercises": "<exercises>"
},
"name": "trainrec_save_workout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Omit to create. | |
| day | No | YYYY-MM-DD. Default today. | |
| name | Yes | e.g. "Push Day". | |
| unit | No | Unit for every weight in this call. Defaults to the person's own unit. | |
| notes | No | ||
| reopen | No | true takes the finish off a workout ended by mistake, so it is under way again. | |
| summary | No | One short line for the change list, e.g. "Logged Push Day". | |
| version | No | Required when id is given. | |
| exercises | Yes | In the order performed, by exercise id (built-in or custom). | |
| startedAt | No | When it started, ISO with offset, if the person said ("this morning at 7"). Kept when editing. | |
| finishedAt | No | When it ended, ISO with offset. Marks a logged workout finished. |