# list_queued_messages

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

Reads the messages waiting to run in one chat of a site, oldest first, from the same queue everyone in the workspace sees.

- Title: Read the message queue
- Scope: `chat:read`
- Access: Read only

Each chat has its own queue, and this reads the queue of `main`, the chat every site comes with, unless you pass `chatId`. A message lands here when `send_message` is called while that chat is busy, or while its queue is parked after a run that was stopped, failed or ended part way through. Each entry carries its `Id`, its `Content`, the mode it runs in as `QueueMode`, its author in `UserId` and `UserName`, and the `QueueVersion` that `edit_queued_message` requires.

An edit is refused when the version it sends is not the current one, so the tool tells the client to read the queue before editing or removing anything, and to read it again after a rejection. See [Message queue](https://modulify.ai/docs/build/message-queue#read-the-queue).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id, from `list_sites` or `get_site`. |
| `chatId` | string | No | The chat whose queue to read: `main` for the chat every site comes with, or the `chatKey` of another chat from `list_chats`. Defaults to `main`. |