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

# Credits

> Reference for managing client prepaid session credits.

The `credits` module provides tools to check client credit balances, inspect credit transaction history, and adjust credits.

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

***

## Available Tools

### `get_client_credits`

Check a client's available credit balances by type.

* **Type:** Read-only
* **Important Input Fields:**
  * `clientId` (string, required): Unique identifier for the client.

### `list_credit_mutations`

List transaction history of additions/deductions to a client's credits.

* **Type:** Read-only
* **Important Input Fields:**
  * `clientId` (string, required): Unique client ID.
  * `page` (integer, optional): Page number.
  * `limit` (integer, optional): Items per page.

### `adjust_client_credits` **`Write`**

Manually add or deduct credits from a client's balance.

* **Type:** Write
* **Important Input Fields:**
  * `clientId` (string, required): Unique identifier for the client.
  * `amount` (integer, required): Number of credits to add (positive) or deduct (negative).
  * `creditType` (string, required): The type of credit (e.g., `session`, `class`).
  * `reason` (string, optional): Context/reason for the manual adjustment.

***

## Natural Language Examples

* *"How many training credits does client client\_9823 have remaining?"*
* *"Deduct 1 training credit from client client\_5f81 because they cancelled late."*

***

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

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": "credits-1",
  "method": "tools/call",
  "params": {
    "name": "adjust_client_credits",
    "arguments": {
      "clientId": "client_abc123",
      "amount": 5,
      "creditType": "personal_training",
      "reason": "Goodwill gesture adjustment"
    }
  }
}
```
