Edit a draft workout
edit_draft_workoutEdit one calendar day's session in the cached plan draft: change workout_sub_type, target_distance_km, target_pace_seconds_per_km, or coach_note; pass make_rest=true to clear the day to a rest day; editing an empty day creates a session. Draft-only: changes the cached preview and nothing the athlete sees. Returns the refreshed plan; content_preview holds whole weeks from the first changed week and next_cursor continues in get_plan_draft. Only the account that created the draft can edit it.
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": {
"athlete_id": "<athlete_id>",
"draft_id": "<draft_id>",
"week": "<week>",
"day": "<day>"
},
"name": "edit_draft_workout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| day | Yes | Day of the week; abbreviations such as 'Sat' and 1-7 (Monday=1) work. | |
| week | Yes | Plan week number, starting at 1. | |
| draft_id | Yes | draft_id from create_training_plan or a draft edit by this account (single-use, expires 24 hours after drafting). | |
| make_rest | No | Clear the day to a rest day. | |
| athlete_id | Yes | The draft's owner: the athlete for an individual draft; for a group draft, the coach's own id from get_current_user. | |
| coach_note | No | A note shown with the session. | |
| workout_sub_type | No | Session type, for example easy_run, tempo_run, long_run or interval_run. | |
| target_distance_km | No | Session distance in km. | |
| target_pace_seconds_per_km | No | Target pace in seconds per km (300 = 5:00/km). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | No | ||
| draft | No | ||
| error | No | ||
| level | No | ||
| weeks | No | ||
| status | No | ||
| message | No | ||
| privacy | No | Present when the athlete's settings withhold data. | |
| draft_id | No | ||
| group_id | No | ||
| retry_at | No | Epoch milliseconds; an uncharged allowance-limited job resumes on a poll at or after this instant. | |
| warnings | No | ||
| next_step | No | What can be done next, for example after a failure. | |
| operation | No | ||
| plan_name | No | ||
| athlete_id | No | ||
| expires_at | No | ||
| group_name | No | ||
| next_steps | No | ||
| assumptions | No | ||
| athlete_pbs | No | ||
| goal_source | No | ||
| next_cursor | No | Reads the next page; null on the last page. | |
| reason_code | No | ||
| total_weeks | No | ||
| member_count | No | ||
| retry_at_iso | No | The epoch field beside it as a UTC instant; the local day can differ. | |
| subject_kind | No | ||
| user_content | No | Fields in this result that people wrote. | |
| changed_cells | No | ||
| phase_outline | No | ||
| expires_at_iso | No | The epoch field beside it as a UTC instant; the local day can differ. | |
| missing_inputs | No | ||
| weeks_returned | No | ||
| content_preview | No | ||
| generation_state | No | queued, generating, ready, failed or access_revoked; only ready content is editable/saveable. | |
| truncated_fields | No | Lists cut to fit one response: rows returned and total. | |
| allowance_charged | No | Audit of the stable Redis reservation; retries of this job do not charge again. | |
| duration_in_weeks | No | ||
| generated_content | No | Fields in this result that NexRex's AI wrote. | |
| weekly_mileage_km | No | ||
| workout_preference | No | ||
| preferences_applied | No | ||
| session_definitions | No | Sessions that several rows of this result share by session_ref. | |
| content_block_fields | No | Column names of every content_blocks row, nested blocks rows included. | |
| recommended_start_date | No | ||
| training_principle_org_id | No | ||
| training_principle_source | No |