Create or update planned WORKOUT events in Intervals. For changes to an existing STAS workout, keep the same external_id and call this tool again; do not delete the day/window just to edit time, name, note, load, color, or workout_builder. This tool is self-contained; do not look for SKILL.md or examples in the athlete's calendar. dry_run is required: false writes the event, true previews only. Send activity_type as Run/Ride/Swim/Workout/WeightTraining/Yoga/Pilates/Stretching/Walk/Hike/Elliptical/NordicSki/HighIntensityIntervalTraining/Other, stas_note for the human workout note, and external_id=plan:YYYY-MM-DD:<slug>. Do not send low-level Intervals fields category, type, sport, workoutType, target, description, workout_doc, icu_workout, filename, or file_contents. The server maps activity_type to Intervals type and category=WORKOUT and infers Intervals target=HR/PACE/POWER from Run/Ride workout_builder only. Use local datetimes without a timezone suffix, e.g. 2026-05-13T08:00:00, not 2026-05-13T08:00:00+03:00. workout_builder is mandatory for any interval/key workout save, mainly Run/Ride intervals; never save intervals as prose-only. Omit workout_builder only for easy/simple workouts without structured steps. If you use workout_builder, do not include ## STAS or ## Workout; the server adds wrappers. Builder headers and repeat headers are plain lines without '-', e.g. 'Warmup', 'Main Set 5x', 'Cooldown'. Actual step lines start flush-left with '- ' and contain duration/distance plus a target, e.g. '- 1km 4:25/km-4:35/km Pace', '- 10m 75%', or '- Recovery 90s Z1 HR'. For swim workouts, distance-led steps such as '- 400m easy' and '- 6 x 50m build' are allowed. For HR-only workouts, every structured step target should use HR syntax like '- 10m Z2 HR' or '- 3m Z4 HR'. Do not write '- Warmup' followed by indented child bullets. Use '1km' or '1000mtr' for run/ride meters; bare 400m is allowed for swim but m means minutes in run/ride builder text. icu_training_load is accepted for planned workouts, but Intervals.icu can still return icu_atl/icu_ctl as null or exclude/partially weight non-cardio types in Fitness/Fatigue depending on athlete settings. After writing a structured key workout, read it back with get_planned_events and check workout_doc.steps is non-empty before claiming it is structured. Example real interval write arguments. Replace the date/time and paces, but keep this exact JSON shape. Use activity_type, stas_note, and mandatory workout_builder for interval/key workout saves. workout_builder contains only native Intervals.icu Workout Builder text: repeat headers do not start with "-", step lines are flush-left, and nested Markdown bullets are forbidden. {"dry_run":false,"events":[{"activity_type":"Run","name":"Intervals: 5x1000m","start_date_local":"2026-05-13T08:00:00","end_date_local":"2026-05-13T08:55:00","stas_note":"Goal: controlled interval work without overreaching.\nRule: if HR rises too fast or form breaks, stop after 4 reps.","workout_builder":"Warmup\n- 15m Z2 HR\n\nMain Set 5x\n- 1km 4:25/km-4:35/km Pace\n- Recovery 90s Z1 HR\n\nCooldown\n- 10m Z1 HR","external_id":"plan:2026-05-13:intervals-5x1000m","color":"green","moving_time":3300}]}
Connector