Save and assign a training plan
save_training_planSave a previewed plan draft, once the coach or athlete has confirmed it. Side effects with save_mode='save_and_assign' (default, athletes only): every workout of the draft is scheduled on the athlete's calendar, the plan becomes their primary plan, a Garmin workout sync is queued when the athlete has Garmin connected, and when a coach saves for an athlete the athlete gets an in-app notification. save_mode='template_only' saves a Training Plan Template and changes no calendar; it is the only mode for group drafts, whose template assign_group_plan then assigns. Pass exactly one of athlete_id or group_id. A draft is single-use, expires 24 hours after drafting and only the account that drafted it can save it, so a repeated save changes nothing. previous_primary_plan, when present, is the earlier primary plan, which stays active but demoted; overlapping_workouts counts its upcoming workouts on days the new plan also schedules.
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": {
"draft_id": "<draft_id>"
},
"name": "save_training_plan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| draft_id | Yes | draft_id from create_training_plan or a draft edit by this account (single-use, expires 24 hours after drafting). | |
| group_id | No | A group id from get_team_overview. Pass exactly one of athlete_id or group_id. | |
| plan_name | No | Name for the saved plan; defaults to the draft's. | |
| save_mode | No | save_and_assign: schedule the plan for the athlete; template_only: save a template only (the only mode for group drafts). | save_and_assign |
| athlete_id | No | The athlete's user id (get_current_user, get_coach_athletes or find_athlete). Pass exactly one of athlete_id or group_id. | |
| start_date | No | YYYY-MM-DD; defaults to the draft's start date. | |
| long_run_preference | No | Long-run day; omit to keep the plan's own long-run day. | |
| training_days_per_week | No | Training days per week, 2-7. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| weeks | No | ||
| status | No | ||
| message | No | ||
| privacy | No | Present when the athlete's settings withhold data. | |
| group_id | No | ||
| warnings | No | ||
| next_step | No | What can be done next, for example after a failure. | |
| plan_name | No | ||
| save_mode | No | ||
| assign_url | No | ||
| athlete_id | No | ||
| start_date | No | ||
| next_cursor | No | Reads the next page; null on the last page. | |
| reason_code | No | ||
| total_weeks | No | ||
| subject_kind | No | ||
| template_url | No | ||
| user_content | No | Fields in this result that people wrote. | |
| weeks_returned | No | ||
| plan_instance_id | No | ||
| training_plan_id | No | ||
| truncated_fields | No | Lists cut to fit one response: rows returned and total. | |
| generated_content | No | Fields in this result that NexRex's AI wrote. | |
| 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. | |
| overlapping_workouts | No | Upcoming workouts of the previous primary plan on shared days. | |
| previous_primary_plan | No |