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

# Nutrition Plans

> Reference for managing client nutritional plan blueprints.

The `nutrition_plans` module provides tools to view and manage customized diets
and meal plan templates assigned to clients.

| Key                  | Value             |
| :------------------- | :---------------- |
| **Module Key**       | `nutrition_plans` |
| **Sensitivity**      | `operational`     |
| **Consent Required** | None              |

***

## Available Tools

### `list_nutrition_plans`

List nutrition plans assigned to a client.

* **Type:** Read-only
* **Important Input Fields:**
  * `clientId` (string, optional): Filter plans for a specific client.
  * `page` (integer, optional): Page number.
  * `limit` (integer, optional): Items per page.

### `get_nutrition_plan`

Retrieve detailed meal specifications and target macronutrient goals of a plan.

* **Type:** Read-only
* **Important Input Fields:**
  * `planId` (string, required): Unique identifier of the nutrition plan.

### `create_nutrition_plan` **`Write`**

Create a coach-authored nutrition plan for a client.

* **Type:** Write
* **Important Input Fields:**
  * `clientId` (string, required): Unique client ID.
  * plan fields (required): Plan metadata, date window, targets, and slots.

### `update_nutrition_plan` **`Write`**

Update metadata, status, date window, target macros, notes, or existing slots.

* **Type:** Write
* **Important Input Fields:**
  * `planId` (string, required): Unique identifier of the nutrition plan.
  * plan fields (optional): Provide only the fields that should change.

### `set_nutrition_plan_item` **`Write`**

Add, replace, or remove one food product, recipe, supplement, or custom item in an existing Nutrition V2 plan slot. The mutation is selected with the required `action` parameter.

* **Type:** Write
* **Important Input Fields:**
  * `action` (string, required): One of `add`, `replace`, or `remove`.
  * `clientId` (string, required): Unique client ID.
  * `planId` (string, required): Unique identifier of the nutrition plan.
  * `slotKey` (string, required): Existing slot key.
  * `item` (object): The item to add. Required when `action` is `add`.
  * `itemRef` (object): Reference criteria (`itemId`, `sourceId`, `itemIndex`, or `title`) selecting the existing item. Required when `action` is `replace` or `remove`.
  * `replacement` (object): The new item to place in the slot. Required when `action` is `replace`.

### `materialize_nutrition_day` **`Write`**

Create or refresh a concrete Nutrition V2 day for a client and date from one of the client's plans.

* **Type:** Write
* **Important Input Fields:**
  * `clientId` (string, required): Unique client ID.
  * `planId` (string, required): Unique identifier of the nutrition plan.
  * `date` (string, required): Target date in YYYY-MM-DD format.

### `archive_nutrition_plan` **`Write`**

Archive or soft-delete a client's Nutrition V2 plan.

* **Type:** Write
* **Important Input Fields:**
  * `planId` (string, required): Unique identifier of the nutrition plan.

***

## Natural Language Examples

* *"List all nutrition plans created for client client\_5f81."*
* *"Retrieve details of the active diet plan plan\_abc123."*
* *"Add Greek yogurt to Jane's breakfast slot in her active plan."*

***

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

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": "nut-plan-1",
  "method": "tools/call",
  "params": {
    "name": "list_nutrition_plans",
    "arguments": {
      "clientId": "client_abc123"
    }
  }
}
```
