get_chat_messages
Retrieve messages from a chat by its ID, with options to limit results and paginate using a before_message_id parameter.
Instructions
Get messages from a specific chat.
Args: chat_id: ID of the chat to get messages from limit: Maximum number of messages to return (default: 50) before_message_id: Get messages before this message ID (for pagination). If provided, returns messages older than this ID.
Returns: ToolResponse with GetChatMessagesPayload containing chat messages including sender, text, and timestamp
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": {
"chat_id": "<chat_id>"
},
"name": "get_chat_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| chat_id | Yes | ||
| before_message_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Error message if operation failed | |
| message | Yes | Human-readable summary of the result | |
| payload | No | The actual response data | |
| success | Yes | Whether the operation was successful |