Update a routine
update_routineChange ONE routine by id (from get_routines): rename it, move its start time, set per-weekday times or days, change its length or steps, or switch it on or off. Only the fields you send change. steps REPLACES the whole list (send every step in order); addSteps and removeSteps edit it. When steps change, the length follows them unless durationMin is sent. Use update_task for tasks that are not routines, and delete_task with a date to skip a routine for one day. Editing the built-in morning or evening routine also switches it on. Returns {ok:true, id, title, hour, minute, durationMin, steps, daysOfWeek, enabled?}; ok:false (not_found, not_a_routine, title_taken, reserved_title, invalid_args) changed nothing. Preview rule: if this is the second task or routine change within about 90 seconds, nothing is saved and the result is needs_preview with the pending and saved changes - show them to the user and call again with confirm:true only after they agree.
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": {
"id": "<id>"
},
"name": "update_routine"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The routine id from get_routines, e.g. "routine_morning". | |
| hour | No | New usual start hour, 0-23 local time. | |
| steps | No | The COMPLETE ordered step list - REPLACES every step (read them with get_routines first). Use removeSteps to drop steps. | |
| title | No | Rename it; same routine, time, steps and reminders. | |
| minute | No | New start minute, 0-59 (default 0 when hour is sent). | |
| confirm | No | Set true ONLY after the user has seen and approved this change in a preview you showed them (needed when a request changes more than one task or routine). Never set it on your own. Default false. | |
| enabled | No | false = switch it off (hidden from the schedule, no reminders, steps and history kept); true = switch it back on. | |
| addSteps | No | Steps to append at the end, e.g. [{"name":"Stretch","durationMin":5}]. Ignored with steps. | |
| dayTimes | No | A different start time on some weekdays; hour/minute stay the usual time. List only the days that differ, e.g. [{"weekday":6,"hour":9}] for 9:00 on Saturdays. Replaces earlier per-day times; [] = one time every day. | |
| daysOfWeek | No | Weekdays it runs on, 1=Monday .. 7=Sunday, e.g. [1,2,3,4,5] for weekdays only. Omit (create) or [] (update) for every day. | |
| durationMin | No | New length in minutes, 5-180. Omitted when steps change: the length follows the steps. | |
| removeSteps | No | Names of steps to remove (case-insensitive), e.g. ["Stretch"]. Ignored with steps. |