Read Telegram history by date or unread status
telegram_get_chat_historyRead a Telegram chat's newest-first message history, including uncaptioned attachments, without marking messages read. Filter by date or unread status and use cursors to paginate results.
Instructions
Read newest-first history, including uncaptioned attachments, without marking read.
date_from is inclusive; date_to exclusive. Dates must include timezone, e.g. 2026-09-16T00:00:00+01:00. Return next_cursor for more; never claim an entire period was checked before pagination finishes. Text is bounded and marked when truncated.
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": "telegram_get_chat_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum items returned in this page, from 1 to 20. A shorter page can still have next_cursor. | |
| cursor | No | Opaque next_cursor from this tool's previous page. Omit for the first page; keep the same chat, query and filters when continuing. Never construct or modify it. Follow a returned cursor even after a short or empty page. | |
| chat_id | Yes | Exact nonzero native TDLib chat_id returned by Telegram list/search/history tools. Keep its sign and value; do not convert a Bot API ID or Telegram URL. | |
| date_to | No | Exclusive upper bound for message dates, as ISO 8601 with timezone. Must follow date_from when both are supplied; omit for no upper bound. | |
| date_from | No | Inclusive lower bound for message dates, as ISO 8601 with timezone, for example 2026-09-16T00:00:00+01:00. Omit for no lower bound. | |
| unread_only | No | Return only incoming messages newer than the chat's last-read inbox position. This does not mark messages read. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| next_cursor | Yes | ||
| scanned_count | Yes | ||
| trust_boundary | No |