Rescale a draft week
rescale_draft_weekScale one week's total training volume in the cached plan draft, either to an absolute target_km or by percent_change (e.g. -15 for 15% lighter). Race entries stay fixed. 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>"
},
"name": "rescale_draft_week"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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). | |
| target_km | No | The week's new total distance in km. | |
| 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. | |
| percent_change | No | Volume change in percent, for example -15 for lighter. |
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 |