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

# Chats

> Reference for viewing active conversations and chat message history.

The `chats` module provides tools to view chat rooms and message history for company-client communication.

| Key                  | Value                         |
| :------------------- | :---------------------------- |
| **Module Key**       | `chats`                       |
| **Sensitivity**      | `private_communication`       |
| **Consent Required** | `privateCommunicationConsent` |

***

## Available Tools

### `list_chats`

List active conversations, messaging rooms, or channels.

* **Type:** Read-only
* **Important Input Fields:**
  * `page` (integer, optional): Page number.
  * `limit` (integer, optional): Items per page.

### `get_chat_messages`

Retrieve message history from a specific chat channel.

* **Type:** Read-only
* **Important Input Fields:**
  * `chatId` (string, required): Unique identifier of the chat room.
  * `limit` (integer, optional): Number of messages to fetch.
  * `beforeMessageId` (string, optional): Fetch messages sent before this ID for pagination.

***

## Natural Language Examples

* *"List all active chat conversations."*
* *"Retrieve the last 20 messages from chat chat\_8812."*

***

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

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": "chat-1",
  "method": "tools/call",
  "params": {
    "name": "get_chat_messages",
    "arguments": {
      "chatId": "chat_abc123",
      "limit": 10
    }
  }
}
```
