edit_routine
Use this when the user wants to change one of their saved Reps routines: swap, add or remove exercises, or change sets, targets, order or name. First call get_routines for its routine_id, current exercises and updated_at. This writes straight away: tell the user exactly what will change (what is added, removed or adjusted) and wait for an explicit yes in this conversation. Send the FULL end state in exercises, every exercise the routine should contain, in order; anything left out is removed. An exercise the routine keeps keeps its own sets: a target or note you leave out of it stays as saved, and a target you change goes to its working sets. A timed hold or cardio takes target_duration_seconds instead of target_reps. Pass the updated_at you read as base_updated_at: if the routine changed in the Reps app since, nothing is saved and the result is routine_changed. The result lists the routine as it now stands. The change shows up in the Reps app after its next sync (up to 5 minutes) or when the app is reopened.
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": {
"routine_id": "<routine_id>",
"exercises": "<exercises>",
"base_updated_at": "<base_updated_at>"
},
"name": "edit_routine"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| exercises | Yes | ||
| routine_id | Yes | ||
| base_updated_at | Yes | ||
| estimated_duration_minutes | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| name | Yes | ||
| exercises | Yes | ||
| routine_id | Yes | ||
| updated_at | Yes | ||
| exercise_count | Yes | ||
| visible_in_app | Yes |