Create a workout
create_workoutBuild a workout and return a link that opens it on the user's iPhone, ready to save into the Fitness app, which sends it to the Watch. Always give the user the markdown link it returns, with the full URL inside. Check list_activities first for what the activity supports.
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": {
"activity": "<activity>",
"blocks": "<blocks>"
},
"name": "create_workout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | shown in the Workout app and on the link, e.g. "Norwegian 4×4"; always give one, short enough for the Watch | |
| blocks | Yes | ||
| warmup | No | ||
| activity | Yes | call list_activities for what each one supports | |
| cooldown | No | ||
| location | No | indoor changes what a sport offers: a stationary bike has no speed or distance | |
| attachFile | No | also return the file itself, for clients that render an attachment. Off by default: a client that cannot render one rejects the whole reply rather than ignoring it, and then nothing comes back at all. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| link | Yes | the workout itself, as a link; never shorten it | |
| steps | Yes | distinct steps, counting a repeated set once | |
| savedTo | No | where the file was written, when it was | |
| fileName | Yes | ||
| markdown | Yes | the link as markdown, [Open the workout](link): give this to the user, with the link text in their language and the URL unchanged | |
| warnings | Yes | ||
| sizeBytes | Yes | ||
| totalTime | No | the steps that have a time, added up with their repeats, as h:mm:ss or m:ss | |
| totalDistance | No | ||
| stepsWithRepeats | Yes | steps as performed, every repetition counted |