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

> Reference for a connected client following assigned training plans and logging sessions.

The `client_ai_workout` module lets a client's AI assistant read the
client's assigned non-WOD training plans, days, exercises, and history, and
start, log, and complete the client's own training sessions. Client AI tools
are subject-bound: every call resolves to the authenticated client
(`subjectClientId`); no target client can be supplied, and WOD or group
sessions are handled by the `client_ai_wod` module or the client app. The
module is available only when the client is connected to the company, client AI
access is enabled for that 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_workout` |
| **Sensitivity**      | `health`            |
| **Consent Required** | `healthDataConsent` |

***

## Available Tools

### `client_ai_list_my_workout_plans`

List bounded non-WOD training plans assigned to the authenticated client. No target client can be supplied.

* **Type:** Read-only
* **Important Input Fields:**
  * `status` (string, optional): Plan status filter, one of `Active`, `Inactive`, `Draft`.
  * `language` (string, optional): Content language, one of `en`, `nl`.
  * `page` (integer, optional): Page number, starting at 1.
  * `limit` (integer, optional): Page size, max 50.

### `client_ai_get_my_workout_plan`

Get one non-WOD training plan assigned to the authenticated client, including bounded day summaries.

* **Type:** Read-only
* **Important Input Fields:**
  * `planId` (string, required): The unique plan ID (24-character ObjectId).
  * `language` (string, optional): Content language, one of `en`, `nl`.

### `client_ai_get_my_workout_day`

Get one visible day from a non-WOD training plan assigned to the authenticated client.

* **Type:** Read-only
* **Important Input Fields:**
  * `planId` (string, required): The unique plan ID (24-character ObjectId).
  * `planMomentId` (string, required): The unique ID of the plan day/moment (24-character ObjectId).
  * `language` (string, optional): Content language, one of `en`, `nl`.

### `client_ai_get_workout_exercise`

Get an allowlisted exercise visible to the authenticated client, including that client's own exercise when applicable.

* **Type:** Read-only
* **Important Input Fields:**
  * `exerciseId` (string, required): The unique exercise ID (24-character ObjectId).
  * `language` (string, optional): Content language, one of `en`, `nl`.

### `client_ai_get_my_exercise_history`

Get bounded completed non-WOD performance history for one exercise and the authenticated client.

* **Type:** Read-only
* **Important Input Fields:**
  * `exerciseId` (string, required): The unique exercise ID (24-character ObjectId).
  * `dateFrom` (string, optional): Start date filter in ISO 8601 format. Maximum window is 366 days.
  * `dateTo` (string, optional): End date filter in ISO 8601 format.
  * `language` (string, optional): Content language, one of `en`, `nl`.
  * `limit` (integer, optional): Maximum number of history records, max 50.

### `client_ai_list_my_workout_sessions`

List bounded non-WOD, non-group training sessions for the authenticated client.

* **Type:** Read-only
* **Important Input Fields:**
  * `status` (string, optional): Session status filter, one of `planned`, `in_progress`, `paused`, `completed`, `stopped`, `cancelled`.
  * `dateFrom` (string, optional): Start date filter in ISO 8601 format. Maximum window is 366 days.
  * `dateTo` (string, optional): End date filter in ISO 8601 format.
  * `page` (integer, optional): Page number, starting at 1.
  * `limit` (integer, optional): Page size, max 50.

### `client_ai_get_my_workout_session`

Get one non-WOD, non-group training session and up to 100 allowlisted performance records for the authenticated client.

* **Type:** Read-only
* **Important Input Fields:**
  * `sessionId` (string, required): The unique session ID (24-character ObjectId).

### `client_ai_get_my_workout_machine_preset`

Get effective company and system setup fields for an exercise. Coach-private presets are excluded.

* **Type:** Read-only
* **Important Input Fields:**
  * `exerciseId` (string, required): The unique exercise ID (24-character ObjectId).

### `client_ai_get_my_workout_equipment_profile`

Get the authenticated client's bounded home-equipment profile and visible catalog without exposing company equipment mutation.

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

### `client_ai_start_or_resume_my_workout_session` **`Write`**

Idempotently start or resume the authenticated client's assigned plan day or freestyle training session. WOD and group sessions are rejected.

* **Type:** Write
* **Important Input Fields:**
  * `planId` (string, optional): Plan ID (24-character ObjectId) to start from. Omit both plan fields for a freestyle session.
  * `planMomentId` (string, optional): Plan day/moment ID (24-character ObjectId) to start.
  * `language` (string, optional): Content language, one of `en`, `nl`.

### `client_ai_log_my_workout_performance` **`Write`**

Idempotently upsert allowlisted sets and client-owned setup values in the authenticated client's active non-WOD, non-group session.

* **Type:** Write
* **Important Input Fields:**
  * `sessionId` (string, required): The active session ID (24-character ObjectId).
  * `exerciseId` (string, required): The exercise ID (24-character ObjectId) the sets belong to.
  * `sets` (array, required): 1-50 set objects. Each set has a required `setNumber` (integer, 1-100) plus optional `setType` (one of `N`, `W`, `D`, `F` — normal, warm-up, drop, failure), `weight` (number), `reps` (number or string), `timeSeconds` (number), `distanceMeters` (number), `restSeconds` (number), `rpe` (number, 0-10), `completed` (boolean), and `notes` (string, max 1000 chars).
  * `performanceId` (string, optional): Existing performance record ID (24-character ObjectId) to update.
  * `planExerciseId` (string, optional): Plan exercise ID (24-character ObjectId) linking the performance to the plan day.
  * `notes` (string, optional): Notes on the exercise performance. Max 2000 chars.
  * `restSeconds` (number, optional): Rest time between sets in seconds.
  * `isCompleted` (boolean, optional): Mark the exercise performance as completed.
  * `setupValues` (array, optional): Up to 8 `{ key, value }` machine setup values used in this session (value is a string, number, or boolean).
  * `nextSetupValues` (array, optional): Up to 8 `{ key, value }` setup values to remember for next time.
  * `setupSettingsEnabled` (boolean, optional): Whether machine setup tracking is enabled for this exercise.
  * `showSetRpe` (boolean, optional): Whether RPE is shown per set for this exercise.

### `client_ai_complete_my_workout_session` **`Write`**

Idempotently complete the authenticated client's active non-WOD, non-group session through the existing completion and XP core.

* **Type:** Write
* **Important Input Fields:**
  * `sessionId` (string, required): The active session ID (24-character ObjectId).
  * `notes` (string, optional): Notes on the completed session. Max 2000 chars.

***

## Natural Language Examples

* *"What's on my training plan for today?"*
* *"Start my push day workout."*
* *"Log 3 sets of bench press: 8 reps at 80 kg, RPE 8."*
* *"What was my heaviest deadlift set in the last three months?"*

***

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

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": "client-workout-1",
  "method": "tools/call",
  "params": {
    "name": "client_ai_log_my_workout_performance",
    "arguments": {
      "sessionId": "64b64c0f2f5f4c0012345678",
      "exerciseId": "64b64c0f2f5f4c0012345679",
      "sets": [
        {
          "setNumber": 1,
          "setType": "N",
          "weight": 80,
          "reps": 8,
          "rpe": 8,
          "completed": true
        }
      ]
    }
  }
}
```
