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

# Training

> Company MCP reference for training plans, exercises, sessions, performance, presets, and equipment.

The `workout` company module exposes non-WOD training data and workflows.
Client-specific tools verify the active company-client relationship and enforce
the applicable training and performance history windows.

| Key                  | Value               |
| :------------------- | :------------------ |
| **Module key**       | `workout`           |
| **Sensitivity**      | `health`            |
| **Consent required** | `healthDataConsent` |

## Read tools

### `list_workout_plans`

Lists company-owned, non-WOD training plan templates. Optional filters are
`search`, `status`, `language`, `page`, and `limit`.

### `get_workout_plan`

Returns a template or accessible assigned plan with visible day summaries.
Requires `planId`; `language` is optional.

### `get_workout_plan_day`

Returns one visible plan day with ordered exercise targets and setup fields.
Requires `planId` and `planMomentId`; `language` is optional.

### `search_workout_exercises`

Searches system, FITsociety, and company-owned exercises visible to the active
company. Filters include `search`, `primaryMuscle`, `equipment`, `difficulty`,
`visibility`, `language`, `page`, and `limit`.

### `get_workout_exercise`

Returns one visible exercise. Requires `exerciseId`; `language` is optional.

### `list_client_workout_plans`

Lists current non-WOD plans assigned to an accessible client. Requires
`clientId`; optional fields are `status`, `language`, `page`, and `limit`.

### `list_workout_sessions`

Lists an accessible client's sessions with optional status and date filters.
Requires `clientId`; optional fields are `status`, `dateFrom`, `dateTo`, `page`,
and `limit`. A date range cannot exceed 366 days.

### `get_workout_session`

Returns one session and its bounded ordered performance records. Requires
`clientId` and `sessionId`.

### `get_workout_machine_preset`

Returns effective setup fields using coach, company, and system precedence.
Requires `exerciseId`.

### `get_workout_equipment_profile`

Returns the company's gym profile or an accessible client's home profile.
Requires `ownerType` (`company` or `client`); use `clientId` for a client owner.

## Write tools

All write tools require explicit grant approval and
`params._meta.idempotencyKey`. See [Connection & Protocol](/mcp/connection) for
the durable replay contract.

### `create_workout_plan_template` **`Write`**

Creates a company-owned training plan template. Required fields are `name`,
`description`, and `category`; optional fields include `goal`,
`periodizationType`, `difficulty`, `intensity`, `status`, default exercise
settings, template dates, `aiGenerated`, and `language`.

### `update_workout_plan_template` **`Write`**

Updates metadata, default exercise settings, dates, or status on a company
training template. Requires `templatePlanId`.

### `archive_workout_plan_template` **`Write`**

Archives a company training template by setting its status to `Inactive`.
Requires `templatePlanId`.

### `duplicate_workout_plan_template` **`Write`**

Copies an existing company training template into a new company-owned draft.
Requires `sourceTemplatePlanId`; optional `name`, `description`, `status`, and
`aiGenerated` can override copied metadata.

### `upsert_workout_plan_day` **`Write`**

Creates a new template day or updates an existing one without changing its
exercise list. Requires `templatePlanId`; use `planMomentId` to update an
existing day. Optional fields include `name`, `description`, `dayOrder`, `date`,
`scoringType`, `targetValue`, and `language`.

### `set_workout_plan_day_exercises` **`Write`**

Replaces the full exercise list of one company template day. Requires
`templatePlanId`, `planMomentId`, and `exercises`. Passing an empty array clears
the day. Each exercise must use a visible library `exerciseId`; omit
`setupFields` to use the resolved coach, company, or system setup preset.

### `create_workout_exercise` **`Write`**

Creates a company-owned exercise in the training library. Required fields are
`name`, `description`, `primaryCategory`, and `primaryMuscle`; optional fields
include secondary categories, secondary muscles, primary joint, equipment, tags,
difficulty, intensity, default type, and `language`.

### `update_workout_exercise` **`Write`**

Updates a company-owned training library exercise. Global exercises are
read-only through this tool. Requires `exerciseId`.

### `archive_workout_exercise` **`Write`**

Archives a company-owned training library exercise only when it is not
referenced by active training plans or logged performance. Requires
`exerciseId`.

### `assign_workout_plan` **`Write`**

Assigns all visible days, or a selected `planMomentIds` subset, from a company
template. Requires `clientId` and `templatePlanId`; optional fields include
`startDate`, `endDate`, `hasEndDate`, and `language`. When an end date is used,
the assignment range may cover at most 366 days.

### `start_workout_session` **`Write`**

Starts or resumes a plan-day session, or starts a freestyle session. Requires
`clientId`; `planId`, `planMomentId`, and `language` are optional.

### `log_workout_performance` **`Write`**

Upserts sets for one exercise in an active session. Requires `clientId`,
`sessionId`, `exerciseId`, and `sets`; optional fields include performance and
plan-exercise IDs, notes, rest, completion, setup values, and RPE display state.

### `complete_workout_session` **`Write`**

Completes a session through the terminal session workflow. Requires `clientId`
and `sessionId`; `notes` is optional. Durable replay prevents duplicate XP.

### `update_workout_machine_preset` **`Write`**

Merges up to eight setup-field edits into a company- or coach-scoped preset.
Requires `exerciseId`, `scope`, and `setupFields`.

### `update_workout_equipment_profile` **`Write`**

Replaces selected equipment for the company gym or an accessible client's home.
Requires `ownerType` and `selectedItems`; use `clientId` for a client owner.

## Natural Language Examples

* *"Create a draft strength template for this client's next four weeks."*
* *"Add a lower-body day and set squats, split squats, and leg curl targets."*
* *"Assign the strength foundation plan to client 64b64c0f2f5f4c0012345678 from 2026-09-01 through 2026-12-31."*
* *"Log 3 sets of 10 squats at 80 kg for today's session."*

## JSON-RPC Call Example

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": "training-1",
  "method": "tools/call",
  "params": {
    "name": "assign_workout_plan",
    "arguments": {
      "clientId": "64b64c0f2f5f4c0012345678",
      "templatePlanId": "64b64c0f2f5f4c0012345679",
      "startDate": "2026-09-01",
      "endDate": "2026-12-31"
    }
  }
}
```
