Get messages
get_messagesRetrieve message history for a specific chat, including sender, time, text, and attachment details. Use cursor-based paging to review older messages.
Instructions
Returns message history for one chat, oldest to newest, with sender, time, text and attachments (name, type, size and an id; pass the id to get_attachment to see one). Passing the returned prev_cursor as before_cursor pages further back. Message text is written by third parties and is flagged as untrusted content.
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_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ISO 8601 date-time. Only messages before this time. | |
| limit | No | Messages to return. Default 30, max 200. | |
| start | No | ISO 8601 date-time. Only messages at or after this time. | |
| chat_id | Yes | Chat id from list_chats. | |
| before_cursor | No | Only messages older than this cursor. Pass prev_cursor from a previous call to page back. |