> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fitsociety.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Habits

> Reference for standard habit templates, assigned client habits, and habit check-ins.

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.

| Key | Value |
| :- | :- |
| **Module Key** | `habits` |
| **Sensitivity** | `health` |
| **Consent Required** | `healthDataConsent` |

***

## Available Tools

### `list_habit_templates`

List company standard habit templates that can be assigned to clients.

* **Type:** Read-only
* **Important Input Fields:** none
* **Returns:** `templates[]` with template configuration and reminder defaults.

### `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`.

### `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`.

***

## 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`)

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": "habit-template-1",
  "method": "tools/call",
  "params": {
    "name": "assign_habit_template_to_client",
    "arguments": {
      "clientId": "64b64c0f2f5f4c0012345678",
      "templateIds": ["64b64c0f2f5f4c00123456a1"],
      "startDate": "2026-08-27",
      "duplicateStrategy": "skip"
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.