Create a routine
create_routineCreate a NEW repeating routine for the user: a named block at a set time with ordered steps, e.g. "Gym routine" at 18:00 with Warm up 10 min and Lift 40 min. Use it for something done regularly as a sequence of steps; use create_task for a one-off or a simple repeating task, and update_routine to change an existing routine, including the built-in morning and evening routines, which always exist. It runs every day from today unless daysOfWeek is given. Returns {ok:true, id, title, hour, minute, durationMin, steps, daysOfWeek}. Refused with ok:false and nothing saved: reserved_title or title_taken (call get_routines first), invalid_args. 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": {
"title": "<title>",
"hour": "<hour>"
},
"name": "create_routine"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hour | Yes | Start hour, 0-23 in the user's local time, e.g. 18 for 6 pm. | |
| steps | No | Ordered steps, e.g. [{"name":"Warm up","durationMin":10},{"name":"Lift","durationMin":40}]. Optional. | |
| title | Yes | The routine's name, unique among the user's routines, e.g. "Gym routine". "Morning Routine" and "Evening Routine" are reserved. | |
| minute | No | Start minute, 0-59 (default 0). | |
| 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. | |
| 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 | Length in minutes, 5-180. Default: the sum of the steps, else 30. |