Skip to main content
The habits module lets approved coach/company MCP connections manage standard habit templates, assign those templates to clients, inspect active client habits, and read habit compliance entries.

Available Tools

list_habit_templates

List company standard habit templates that can be assigned to clients.
  • Type: Read-only
  • Important Input Fields:
    • page (integer, optional): Page number, starting at 1.
    • limit (integer, optional): Items per page, default 10, maximum 100.
  • Returns: page, limit, total and templates[] with template configuration and reminder defaults. Request the next page while page * limit < total.

create_habit_template

Create a company standard habit template.
  • Type: Write
  • Required Write Grant: create_habit_template
  • Important Input Fields:
    • name (string, required): Template name.
    • habitType (string, required): build or quit.
    • unit (string, required): Tracking unit.
    • goalValue (number/string, conditional): Required for build habits.
    • allowableValue (number/string, conditional): Required and non-negative for quit habits; zero is allowed.
    • goalPeriod (string, optional): day, week, month, or empty.
    • taskDaysMode (string, optional): everyday or specific.
    • specificDaysOfWeek[] (string[], conditional): Required for specific.
    • reminders[] (array, optional): Default reminders with enabled, time, and message.

update_habit_template

Update a company standard habit template. Existing client habits already created from the template are not changed.
  • Type: Write
  • Required Write Grant: update_habit_template
  • Important Input Fields:
    • templateId (string, required): Template ID from list_habit_templates.
    • Any writable template field from create_habit_template.

archive_habit_template

Archive a company standard habit template. Already assigned client habits remain active.
  • Type: Write
  • Required Write Grant: archive_habit_template
  • Important Input Fields:
    • templateId (string, required): Template ID from list_habit_templates.

assign_habit_template_to_client

Create active client habits from one or more standard habit templates.
  • Type: Write
  • Required Write Grant: assign_habit_template_to_client
  • Important Input Fields:
    • clientId (string, required): Client ID from search_clients.
    • templateIds[] (string[], required): One to 25 template IDs.
    • startDate (string, optional): Defaults to today in UTC.
    • endDate (string, optional): Optional end date on or after startDate.
    • duplicateStrategy (string, optional): skip by default, or fail.

list_client_habits

List active habits assigned to a specific client.
  • Type: Read-only
  • Important Input Fields:
    • clientId (string, required): Client ID from search_clients.
    • page (integer, optional): Page number, starting at 1.
    • limit (integer, optional): Items per page, default 10, maximum 100.
  • Returns: page, limit, total and habits[]. Request the next page while page * limit < total.

get_habit_entries

Retrieve daily habit compliance entries for a specific client.
  • Type: Read-only
  • Important Input Fields:
    • clientId (string, required): Client ID from search_clients.
    • dateFrom (string, required): Start date or date-time.
    • dateTo (string, required): End date or date-time. Maximum range is 366 days.
    • habitId (string, optional): Habit ID from list_client_habits.
    • page (integer, optional): Page number, starting at 1.
    • limit (integer, optional): Items per page, default 10, maximum 100.
  • Returns: page, limit, total and entries[], newest first. Request the next page while page * limit < total. truncated is true while later pages remain.
  • Summary: periodSummary[] always covers the whole range and filter, independent of the page. A summary above 5,000 habit periods returns COMPANY_MCP_HABIT_SUMMARY_TOO_LARGE; narrow the range or pass habitId.

update_client_habit Write

Update one habit already assigned to a client (habitId from list_client_habits). Only the provided fields change; the app’s habit validation applies (goalValue for build habits, allowableValue for quit habits). Logged habit entries are kept.
  • Type: Write (requires userConfirmed: true and the write-tool grant)
  • Input Fields:
    • clientId (string, required)
    • habitId (string, required)
    • name (string, optional)
    • description (string, optional)
    • goalValue (number, optional)
    • allowableValue (number, optional)
    • endDate (string, optional)
    • idempotencyKey (string, optional)

remove_client_habit Write

Remove one habit assigned to a client (habitId from list_client_habits) and cancel its reminders. The habit is soft-deleted like in the coach app; logged entries stay. The app only lets a coach remove habits they added or habits the client added.
  • Type: Write (requires userConfirmed: true and the write-tool grant)
  • Input Fields:
    • clientId (string, required)
    • habitId (string, required)
    • idempotencyKey (string, optional)

Natural Language Examples

  • “List our standard habits and assign the hydration habit to client client_abc123.”
  • “Create a standard habit for 8,000 steps per day.”
  • “Is client client_abc123 keeping up with their hydration habit this month?”

JSON-RPC Call Example (assign_habit_template_to_client)