Get chat messages
get_chat_messagesA chat's messages, oldest first in the page, by cursor: the newest page by default; 'before' a message id reads further back, 'after' one reads forward (what came since). 'more' says the page stopped short — pass the first message's id as 'before' for the page before it. Each message: author (absent when an agent wrote it — then 'agent' names the role and whom it answered), Markdown body (absent once deleted, with 'deleted' true), 'replyTo', files by address, 'issues' made of it that you may open. Reading here does not mark the chat read — mark_chat_read does. 'working' lists the agents answering in it now. A secret chat ('secret' true) is end to end: its words open on its people's devices only, so here every message has an empty body — who wrote when, and nothing of what; it cannot be written to from here either.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Read the messages after this id, going forward. Wins over 'before'. | |
| limit | No | How many, 1–100. Default 50. | |
| before | No | Read the messages before this id, going back. | |
| chatId | Yes | The chat's id, as list_chats gives it. |