create_garmin_workout
Create structured Garmin Connect workouts from typed steps, including pace, HR, power, cadence targets, repeat interval blocks, and swim-specific settings. Returns new workout ID and Connect link.
Instructions
Create a new structured workout in Garmin Connect from typed steps: durations, pace/HR/power/cadence targets, repeat blocks for intervals, and swim-specific stroke/equipment/pool-length fields. Use to add a workout; to change one that exists, use update_garmin_workout instead. Returns the new workoutId and a Connect link. Returns a re-auth message, not an exception, if no valid session exists. Example: [{kind:'step', intensity:'warmup', duration:{type:'time', value:10, unit:'min'}}, {kind:'repeat', iterations:5, steps:[...]}].
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Workout name, shown in Garmin Connect and on the device. | |
| sport | No | Sport for this workout: running, cycling, or swimming. Governs which target types apply and whether stroke/equipment/poolLength are used. Defaults to running. | running |
| steps | Yes | The ordered list of steps and repeat blocks that make up the workout, in the order they should be performed. | |
| poolLength | No | Swimming only - pool length for this workout, e.g. 25. Only valid when sport is 'swimming'. | |
| poolLengthUnit | No | Swimming only - unit for poolLength. Defaults to 'm' when poolLength is given without a unit. |