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

# Client AI Measurements

> Reference for a connected client reading and logging their own body measurements.

The `client_ai_measurements` module lets a client's AI assistant read the
client's own measurement history, list the measurement types configured for
their account, and log new measurement entries. Client AI tools are
subject-bound: every call resolves to the authenticated client
(`subjectClientId`) and can never touch another client's measurements. The
module is available only when the company MCP integration feature is enabled,
client AI access is enabled for the client-company relationship, the company's
client MCP policy allows the module (write tools additionally require the
company policy to allow them), and the client has granted health data consent.

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

***

## Available Tools

### `client_ai_get_my_measurements`

Retrieve your own paginated measurement history (weight, body fat %, tape measurements, etc.) sorted newest first. Optionally filter by typeId and date range (max range 366 days).

* **Type:** Read-only
* **Important Input Fields:**
  * `typeId` (string, optional): Measurement type ID to filter results.
  * `dateFrom` (string, optional): Start date filter in ISO 8601 format (`YYYY-MM-DD` or `YYYY-MM-DDTHH:mm:ssZ`).
  * `dateTo` (string, optional): End date filter in ISO 8601 format. Maximum window is 366 days.
  * `page` (integer, optional): Page number for pagination, starting at 1.
  * `limit` (integer, optional): Number of measurements per page, max 50.

### `client_ai_list_my_measurement_types`

Retrieve all active measurement types (e.g. Body Weight, Body Fat %, Chest, Waist) configured for your account, including their scope, base unit, allowed units, and label details.

* **Type:** Read-only
* **Important Input Fields:** None.

### `client_ai_log_my_measurement` **`Write`**

Record a new measurement entry (e.g. Body Weight, Body Fat %, tape measurements) for yourself. Cannot define or edit measurement types.

* **Type:** Write
* **Important Input Fields:**
  * `typeId` (string, required): The unique ID of the measurement type (obtained from `client_ai_list_my_measurement_types`).
  * `value` (number, required): The numeric value of the measurement.
  * `unit` (string, required): The unit of measurement (e.g. `kg`, `%`, `cm`). Must match the type's base unit or allowed units.
  * `measuredAt` (string, optional): ISO 8601 UTC date-time string when the measurement was taken. Defaults to now.
  * `note` (string, optional): Notes accompanying the measurement. Max 500 chars.

***

## Natural Language Examples

* *"Log my weight: 82.4 kg this morning."*
* *"How has my waist measurement changed over the last three months?"*
* *"Which measurements does my coach track for me?"*

***

## JSON-RPC Call Example (`client_ai_log_my_measurement`)

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": "client-measurements-1",
  "method": "tools/call",
  "params": {
    "name": "client_ai_log_my_measurement",
    "arguments": {
      "typeId": "64b64c0f2f5f4c0012345678",
      "value": 82.4,
      "unit": "kg",
      "measuredAt": "2026-08-23T07:15:00Z"
    }
  }
}
```
