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

All records remain scoped to the connected company. The connection's health
consent is required; per-client external-data grants are not required for reading,
editing, or materializing company-owned nutrition records.

Nutrition log tools return a stable response shape across accounts, including
targets, consumed totals, adherence, slots, item references, and bounded
summaries where applicable.

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

***

## Available Tools

### `get_client_nutrition_overview`

Summarize a client's nutrition logs, active plan, missing days, macro gaps, and
adherence over a bounded date range.

* **Type:** Read-only
* **Important Input Fields:**
  * `clientId` (string, required): Unique client ID.
  * `startDate` (string, optional): Inclusive lower bound in YYYY-MM-DD format. Defaults to 13 days before `endDate`.
  * `endDate` (string, optional): Inclusive upper bound in YYYY-MM-DD format. Defaults to today.
  * `includeDaySummaries` (boolean, optional): Include bounded daily summaries. Defaults to `true`.

### `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.
  * `startDate` (string, optional): Start date range filter in YYYY-MM-DD format.
  * `endDate` (string, optional): End date range filter in YYYY-MM-DD format.
  * `page` (integer, optional): Page number.
  * `limit` (integer, optional): Items per page.

### `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.
  * `dayId` (string, required): Unique identifier of the concrete nutrition day.

### `preview_nutrition_day_item_change`

Preview the macro impact of adding, replacing, or removing a planned or
suggested item on a concrete nutrition day slot. This tool never mutates stored
data.

* **Type:** Read-only
* **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`.

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

Use `search_food_products`, `search_recipes`, or `search_supplements` first
when the log should reference an existing catalog entry.

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

Add, replace, or remove a planned or suggested item on a client's concrete nutrition 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."*
* *"Summarize Jane's nutrition adherence over the last 14 days."*
* *"Retrieve details for nutrition day day\_abc123."*
* *"Log 200 grams of Greek yogurt for Jane today."*
* *"Log Jane's morning vitamin D supplement for today."*
* *"Preview replacing Jane's planned breakfast item with a higher-protein option."*

***

## 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",
      "dayId": "day_abc123"
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.