create_habit
Define a new habit with name and type (Boolean or Real with measurable goal, step, unit). Optionally set color, reminders, recurrence, and encouragement.
Instructions
Create a new habit.
[Category: Habits] [Auth: V2]
[Related: list_habits, update_habit, habit_checkin, build_recurrence_rule]
[Workflow: create_habit → habit_checkin daily → get_habit_records to review]
Args:
name: Habit name (required).
habit_type: "Boolean" (done/not done) or "Real" (measurable, needs goal).
goal: Target value for Real habits (e.g., 2.0 for "2L water").
step: Increment step for Real (e.g., 0.25 for quarter-liter).
unit: Measurement unit for Real (e.g., "L", "pages", "min").
color: Hex color, e.g. "#4DB6AC".
icon: Icon resource name.
section_id: Section ID (from list_habit_sections) for time-of-day grouping.
repeat_rule: RRULE string (use build_recurrence_rule). Default = daily.
reminders: Time strings, e.g. ["08:00", "20:00"].
encouragement: Message shown on completion.
target_days: Target days for the habit goal cycle.
start_date: "yyyy-MM-dd".
Examples:
Boolean: create_habit(name="Meditate", color="#7E57C2")
Real: create_habit(name="Read", habit_type="Real", goal=30, step=5, unit="pages")Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| habit_type | No | Boolean | |
| goal | No | ||
| step | No | ||
| unit | No | ||
| color | No | ||
| icon | No | ||
| section_id | No | ||
| repeat_rule | No | ||
| reminders | No | ||
| encouragement | No | ||
| target_days | No | ||
| start_date | No |