save_routine
Use this when the user wants a new workout routine saved to their Reps account ("build me a 60-minute push routine and save it"). This writes straight away: first describe the routine to the user in plain words (its name and each exercise with sets, reps and weight) and wait for an explicit yes in this conversation. A routine is a reusable template, not a log of a finished workout. Reference exercises by exercise_slug or exercise_id from get_exercise_library; one the library does not have is refused with candidates: retry with one only when it is clearly what the user meant, otherwise ask. target_reps is a rep count; for a timed hold or cardio (plank, wall sit, rowing) leave it out and give the time per set in target_duration_seconds (45 for "45 s"). rest_seconds may be 0 (a superset). The result lists what was saved by name. The routine shows up in the Reps app after its next sync (up to 5 minutes) or when the app is reopened; say so.
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": {
"name": "<name>",
"exercises": "<exercises>"
},
"name": "save_routine"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| exercises | Yes | ||
| estimated_duration_minutes | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| name | Yes | ||
| exercises | Yes | ||
| created_at | Yes | ||
| routine_id | Yes | ||
| exercise_count | Yes | ||
| visible_in_app | Yes |