Get Chat Messages
discourse_get_chat_messagesRetrieve chat messages from a Discourse channel. Supports pagination, filtering by date or message ID, and returns message details with metadata.
Instructions
Get messages from a chat channel. Returns JSON object with channel_id, messages array (id, username, created_at, message, edited, thread_id, in_reply_to_id), and meta.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"channel_id": "<channel_id>"
},
"name": "discourse_get_chat_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| direction | No | Pagination direction: 'past' for older messages, 'future' for newer | |
| page_size | No | Number of messages to return (default: 50, max: 50) | |
| channel_id | Yes | The chat channel ID | |
| target_date | No | ISO 8601 date string to query messages around | |
| target_message_id | No | Message ID to query around or paginate from |