get_messages
Fetch chat messages from a Talk conversation, newest first, in compact one-line format. Supports pagination with before_message_id, thread filtering, and optional system messages to retrieve historical context.
Instructions
Get chat messages from a Talk conversation.
Returns messages in reverse chronological order (newest first). Uses a compact format: "[id] author: message text" - one line per message. Messages inside a thread are marked after the author: the thread's first message as '[id] author [thread ""]: text', the rest of the thread as "[id] author [thread ]: text".
IMPORTANT: Start with a small limit (20-50). If you need more context, use before_message_id with the oldest message ID from the previous call to paginate backwards through the history.
Args: token: The conversation token. Use list_conversations to find tokens. limit: Maximum number of messages to return (1-200, default: 50). Start small to avoid exceeding response size limits. before_message_id: Fetch messages older than this message ID (for pagination). Use the smallest message ID from a previous call. Default 0 means start from the newest message. include_system: Include system messages like "User joined", "Conversation created" (default: false - only chat messages). thread_id: Only return messages of this thread (default 0 = all messages, including thread messages). Use list_threads to find thread IDs.
Returns: Compact text with one message per line: "[id] author: message". The last line shows pagination info if more messages may exist. Empty when nothing matches, for example when there is nothing older than before_message_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| token | Yes | ||
| thread_id | No | ||
| include_system | No | ||
| before_message_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |