Create a workout template
create_training_frameCreate a reusable workout template in the coach's library (personal by default, or a team library via "team"). A template has no date and no athletes — schedule it later with apply_training_frame. Zone and % targets stay portable and are resolved per athlete when the template is applied. If no schema field expresses a detail of the coach's intent, put it in the comment of the relevant node — never approximate it into another field, never drop it. If a request expands to more than 3 creations, updates or deletions, do not call this tool in a loop: send them all as one POST batch/ via nolio_api_write with dry_run=true (PATCH and DELETE on planned// and library// included), get the user's go-ahead on a plain-language recap of what will change on whose calendar, then resend the same operations with the returned confirm_token. Returns the normalized template with a human-readable summary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rpe | No | Planned RPE (0-10) — the coach's intended effort. | |
| name | Yes | Workout title. | |
| tags | No | Public tag ids from list_tags (e.g. tag_…) — your own tags, existing only, no creation here. | |
| team | No | Public team id from list_athletes (e.g. team_…) to store the template in the team library. Default: the coach's personal library. A team you are only an assistant of is refused. | |
| color | No | Hex color overriding the sport color, e.g. "#1E64E6". | |
| sport | Yes | The workout's sport: the `sport` field (spt_…) of a list_sports entry of the audience, never its `id` (spu_…). Never guess. | |
| dry_run | No | Validate without writing anything. Problems found on the workout steps and targets (zones, metrics, exercises) come back together, one per step or target; any other problem (payload shape, athlete, sport, date, tags) comes back alone: fix it and dry run again until it comes back valid. | |
| tonnage | No | Planned total tonnage (reps x load of the weighted sets): to override the total derived from the structured content. Null goes back to the derived total. | |
| workout | No | Optional structured content — a simple planned workout without it is a common, legitimate case. Patching it to null clears the structure but NOT duration/distance/rpe: null those explicitly too if they were derived from it. | |
| category | Yes | REQUIRED. Public library category id from list_library_categories (an `event` folder, e.g. cat_…) to file the template under. A template without a category is invisible in the library — always cite one. | |
| distance | No | Planned total distance — for a workout without structured content, or to override the total derived from it. | |
| duration | No | Planned total duration — for a workout without structured content, or to override the total derived from it. | |
| show_rpe | No | Make the planned RPE visible to the athlete. Default false: coach-only, so it does not bias the athlete's perceived effort. | |
| coggan_load | No | Coggan load (TSS) set by hand, overriding the value computed from the structured content or estimated from RPE and duration. Kept until set to null, which goes back to the computed value. Read `load.coggan` for the load in effect and `load.coggan_source` for where it comes from (`rpe` = estimate, never set by hand). | |
| description | No | Plain text shown at the top of the workout. Line breaks are preserved, use them to separate distinct instructions. Accepted only while the workout has no description: to change an existing one, send description_html. | |
| elevation_gain | No | Planned elevation gain — not derivable from the structured content. | |
| elevation_loss | No | Planned elevation loss, not derivable from the structured content. | |
| description_html | No | The description as stored, in HTML, without the structured workout. The only way to change a description that is already set: read it with with_description_html=true, edit only what must change, keep every other tag, and send it back whole. Null on a read that did not ask for it, ignored on write. |