Create a task
create_taskAdd ONE task to a day of the user's Habidu schedule: title, date, start time, duration, optional repeat, steps (subTasks) and a "Bring / prep" checklist. Use it when the user gives a day or a time; for an undated to-do use create_inbox_item, for a step-by-step habit use create_routine, and to change an existing task use update_task. Returns the stored task with its id; it then shows in the app and gets reminders. A past date, an overlap or an identical block comes back ok:false with a hint and is NOT saved - tell the user why, never say it was added. 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>"
},
"name": "create_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| min | No | Start minute, 0-59 (default 0). With hour 14 and min 30 the task starts at 14:30. | |
| date | No | The task's actual calendar date as YYYY-MM-DD. Resolve any explicit date the user gives or an image shows ("June 18", "8/31", "Dec 24") to the correct day, inferring the year from the current date in context (if that month/day already passed this year, use next year unless context says otherwise). ONLY omit this for a task that is genuinely for TODAY — never default a future-dated item to today, and never put the date in the title. | |
| hour | No | Start hour, 0-23 (local). Omit for an `anytime` task (no fixed time). | |
| title | Yes | Short task title, e.g. "Dentist" or "Call mom". | |
| allDay | No | TRUE for a WHOLE-DAY event that has no clock time and spans the entire day — school closures, public holidays, days off, "out of office", a birthday. It is pinned as a banner atop that day and does NOT take a time slot or duration. Use the `date` field for which day. Do NOT set `hour`, `anytime`, or `durationMin` with it. NOT for a timed appointment (a 9am doctor visit is a normal timed task). | |
| effort | No | Rough effort/size: S (small, ~quick), M (medium), L (large). Omit to let it derive from the duration. Offer to split an L task into a smaller first step. | |
| repeat | No | Recurrence: Once (default, one-time), Daily (every day), Weekly (every week on the same weekday as `date`), Monthly (same day-of-month as `date`), or Yearly (same month and day as `date` every year - birthdays, anniversaries). | |
| anytime | No | TRUE for a task with NO fixed time (a phone call, an errand) — it goes to the Inbox and stacks by `context` instead of taking a timeline slot. Set a `context` alongside it. Do NOT set both `anytime` and a specific `hour`. | |
| 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. | |
| context | No | Batch/context tag for stacking same-context tasks: calls (phone calls), commute (do while commuting), errands (out-and-about), deep (focused work sessions ONLY - never a habit or health nudge like drinking water, which is not deep work and must not stack with it). Use it for tasks that group naturally — most phone calls are `calls`. | |
| endDate | No | Only for a MULTI-DAY all-day event (allDay:true): the LAST day of the span as YYYY-MM-DD (inclusive), with `date` as the first day. E.g. "school is closed all week" → date = Monday, endDate = Friday. Omit for a single-day event. | |
| category | No | Optional category label, e.g. Work, Personal, Health, Learning, Creative, Errands, or one of the user's own. | |
| priority | No | Priority: 4 Very High, 3 High, 2 Medium, 1 Low. Set ONLY when the user expresses importance/urgency ("this is critical", "top priority"). Omit otherwise. | |
| subTasks | No | Optional ordered steps, e.g. [{"name":"Warm up","durationMin":10}]. | |
| checklist | No | A "Bring / prep" checklist the user ticks off: things to bring or have ready ("bring the contract and my laptop to the meeting" -> ["Contract", "Laptop"]). Short items, each its own entry. NOT steps (those are timed parts of the block) and never put them in the description. | |
| day_times | No | A DIFFERENT start time on some weekdays of a REPEATING task. `hour`/`min` are the usual time; list only the weekdays that differ. "5:15 on Tuesdays and Thursdays, 7:30 the other days" -> hour 7, min 30, day_times [{weekday:2,hour:5,minute:15},{weekday:4,hour:5,minute:15}]. ONE task, never two. Omit when every day is the same. | |
| alert_type | No | How the reminder fires: "alarm" = a true alarm (rings until dismissed), "push" = a plain notification. Set ONLY when the user explicitly asks ("wake me with an alarm", "just a quiet reminder"). Omit = their default. | |
| daysOfWeek | No | SPECIFIC weekdays the task repeats on: 1=Monday .. 7=Sunday. Use when the user names days — "Monday to Friday"/"weekdays" → [1,2,3,4,5]; "weekends" → [6,7]; "every Mon, Wed, Fri" → [1,3,5]. Overrides the same-weekday-as-date default (set repeat:"Weekly" alongside; the anchor `date` may be any day). Never invent days the user did not state; omit entirely for plain cadences. | |
| description | No | Extra detail that belongs WITH the task but not in its title: a phone number, an address, an account or booking reference, a note to self (things to BRING or have ready go on `checklist`, not here). Use it instead of padding the title - "Call the plumber" with description "555-1234, ask about the leak under the sink". Omit when there is nothing extra to carry. | |
| durationMin | No | Duration in minutes (defaults to 30 when omitted) | |
| in_progress | No | Set TRUE when the user says they are CURRENTLY doing this ("I'm working 1 to 8:30 pm", "I'm in a meeting till 6"): the block is kept on today at its STATED start and duration and marked started, even if it began only minutes ago. Never set it for something they merely plan to do. | |
| contact_name | No | Who a CALL task is to (person/provider), e.g. "Dr. Smith" / "the plumber". | |
| delegated_to | No | The NAME of the person who will do this task instead of the user ("my wife will do the pickup" -> "Wife"). A delegated task stays on the schedule, never counts as an overlap and gets no start reminder - one "Did <name> handle it?" check after it ends. Only when the user says someone else covers it. "Assindo" is the built-in delegate - the user's AI phone assistant app: it makes the phone call or posts to social media for this task. Use delegated_to "Assindo" only when the user asks Assindo to do it; Habidu sends it the task when it is saved (it needs Assindo connected in Settings - Connected apps). | |
| skip_routine | No | ONLY for a one-day wake-up or lie-in that REPLACES that day's routine ("usually 5, but tomorrow 8"): skips the named routine on this task's date so it does not also ring. Never for an ordinary task. One of: morning | evening. | |
| alarm_mission | No | A MISSION that must be done before this ALARM stops ringing (Android and iPhone): "math" = solve math problems, "shake" = shake the phone, "steps" = walk a number of steps, "qr" = scan a QR code / barcode the user registered in Settings > Reminders & alarms > Mission codes. "none" removes it. Setting a mission makes the task an alarm. Set it ONLY when the user explicitly asks ("make me solve math to turn it off", "an alarm I have to shake to stop", "make me walk 200 steps"). Never unprompted. | |
| allow_overlap | No | Set TRUE only after the user confirmed they want the task despite a scheduling conflict you already warned them about — skips the overlap check. | |
| contact_phone | No | The phone number for a CALL task, as given. NEVER invent one — omit if the user has not provided it. | |
| alarm_mission_count | No | How many problems (math, 1-10, default 3), shakes (shake, 10-100, default 30) or steps (steps, 20-1000, default 100). Only with alarm_mission. | |
| alarm_mission_level | No | Math difficulty: easy | medium (default) | hard. Only with alarm_mission "math". |