save_plan
Use this when the user wants a whole training plan (several routines on a schedule, such as a push/pull/legs split) saved to their Reps account, including a plan they bring as a photo, PDF, spreadsheet or pasted text. This writes straight away: first describe the plan to the user (its routines, their exercises and the schedule) and wait for an explicit yes in this conversation. schedule_type is "rotation" (routines run in order, no weekdays) or "fixed_days" (every routine needs a distinct day_of_week, 1 = Monday … 7 = Sunday). To reuse a routine the user already has, pass its routine_id from get_routines: it is LINKED, not copied, and keeps its own name. Otherwise give its name and exercises, with slugs or ids from get_exercise_library (a timed hold or cardio takes target_duration_seconds instead of target_reps). For a plan the user brought, read it yourself, look every exercise up, and add what the library lacks with add_custom_exercise before saving; an unknown exercise is refused with candidates. The plan becomes the active one unless you pass activate: false; that stops the previously active plan, which the result names in replaced_plan, so tell the user. It 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>",
"schedule_type": "<schedule_type>",
"routines": "<routines>"
},
"name": "save_plan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| activate | No | ||
| routines | Yes | ||
| schedule_type | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| name | Yes | ||
| plan_id | Yes | ||
| routines | Yes | ||
| is_active | Yes | ||
| routine_ids | Yes | ||
| replaced_plan | Yes | ||
| schedule_type | Yes | ||
| visible_in_app | Yes | ||
| linked_routine_ids | Yes | ||
| created_routine_ids | Yes |