# list_chats

Source: https://modulify.ai/docs/mcp/chat/list-chats

Lists the open chats of a site with each one's key, title, mode, running generation and unmerged changes, and whether another chat can be started.

- Title: List the chats of a site
- Scope: `chat:read`
- Access: Read only

Every site comes with one chat, whose `chatKey` is `main`. It works like any other chat and can be renamed or closed. While it is closed, `chats` leaves it out, and `create_chat`, or `send_message` to `main`, opens it again. Multiple chats are a paid plan feature: on a paid plan a site can have up to 10 open chats, and 4 of them can run at once. Each chat has its own conversation, queue and mode, and its agent works in its own copy of the site, so the changes of a turn are merged into the site when that turn ends. See [Multiple chats](https://modulify.ai/docs/build/multiple-chats).

Each entry in `chats` carries:

- `chatKey`, which you pass as `chatId` to the other site chat tools.
- `title` and `mode`. A chat that was not given a title, when it was created or by a rename, gets a short title of up to 10 words, written from its messages once one of them says what the chat is for, and is called `New chat` until then. Until its title arrives, the chat whose `chatKey` is `main` is named after the start of its first message.
- `locked`, true when the chat is read-only on the current plan, so nothing new can be sent to it.
- `runningJobId`, the generation running in it right now, or null.
- `pending`, the changes from it that could not be merged into the site automatically, or null. Merge them with `merge_chat_changes` or drop them with `discard_chat_changes`.
- `unbacked`, the changes that are only in the chat's own copy of the site because they could not be saved yet, with a `reason` and `since`, or null. They become `pending` as soon as the site can save them. When they still cannot be saved a day after `since`, `unbacked` goes back to null, and the changes stay only in the chat's copy until its next turn merges them.

`allowance` says whether another chat can be started, in `canCreate`, and when it cannot, why, in `createBlockedReason`: `plan`, `not-ready`, `limit`, `first-build` or `locked`. `mainOpen` in it says whether the chat whose `chatKey` is `main` is open. While it is closed, `canCreate` is true on every plan, because `create_chat` opens it again. `live` names the chat whose unfinished changes the preview shows on top of the merged site, or is null.

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id, from `list_sites` or `get_site`. |