Read chat history
get_messagesRead recent messages from an allowlisted Telegram chat, oldest first, and paginate older history by passing the prior nextBeforeMessageId as beforeMessageId.
Instructions
Read recent messages from one allowlisted chat, oldest first. Paginate older messages by passing the previous nextBeforeMessageId as beforeMessageId.
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": "<chat>"
},
"name": "get_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat | Yes | Allowlisted chat: @username, t.me link, numeric id, or exact title. | |
| limit | No | Number of messages to return (default from config). | |
| sinceDate | No | Only return messages at or after this ISO date or Unix timestamp in seconds. | |
| beforeMessageId | No | Return messages older than this message id. Use nextBeforeMessageId from a previous call. |