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

> Reference for viewing client daily food logs.

The `nutrition_logs` module provides tools to inspect and adjust daily food
logging journals submitted by clients.

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

***

## Available Tools

### `list_nutrition_days`

List calendar dates containing diet logs submitted by a client within a range.

* **Type:** Read-only
* **Important Input Fields:**
  * `clientId` (string, required): Unique client ID.
  * `dateFrom` (string, optional): Start date range filter.
  * `dateTo` (string, optional): End date range filter.

### `get_nutrition_day`

Retrieve meals, ingredients, and nutrients logged by the client on a specific day.

* **Type:** Read-only
* **Important Input Fields:**
  * `clientId` (string, required): Unique client ID.
  * `date` (string, required): Target date in YYYY-MM-DD format.

### `log_nutrition_item` **`Write`**

Log a consumed nutrition item for a client.

* **Type:** Write
* **Important Input Fields:**
  * `clientId` (string, required): Unique client ID.
  * `date` (string, required): Target date in YYYY-MM-DD format.
  * item fields (required): The consumed product, recipe, supplement, or custom item.

### `set_nutrition_day_item` **`Write`**

Add, replace, or remove a planned or suggested item on a client's concrete Nutrition V2 day slot. The mutation is selected with the required `action` parameter. This tool never touches consumed items; use `log_nutrition_item` to log consumed food.

* **Type:** Write
* **Important Input Fields:**
  * `action` (string, required): One of `add`, `replace`, or `remove`.
  * `clientId` (string, required): Unique client ID.
  * `dayId` (string, required): Unique identifier of the concrete nutrition day.
  * `slotKey` (string, required): Existing slot key.
  * `itemList` (string, optional): `plannedItems` (default) or `suggestedItems`.
  * `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 replacement item. Required when `action` is `replace`.

***

## Natural Language Examples

* *"List all days John Doe logged his food last week."*
* *"Retrieve details of what client client\_5f81 ate on 2026-06-25."*
* *"Log 200 grams of Greek yogurt for Jane today."*

***

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

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": "nut-log-1",
  "method": "tools/call",
  "params": {
    "name": "get_nutrition_day",
    "arguments": {
      "clientId": "client_abc123",
      "date": "2026-06-25"
    }
  }
}
```
