tg_get_messages
Read Telegram chat history and fetch specific messages by IDs, around search hits, pagination cursors, or dates to retrieve the needed conversation context.
Instructions
Read history or fetch specific messages.
Use ids for exact messages, around_id for context around a search hit,
before_id/after_id for pagination, and no cursor for the latest messages.
Results are oldest first and include next cursors.
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": "tg_get_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | No | Fetch these exact message ids. | |
| chat | Yes | Chat reference: @username, t.me link, or numeric chat id. | |
| limit | No | ||
| after_id | No | Messages newer than this id. | |
| max_date | No | ISO date or unix timestamp; date-only means end of day. | |
| min_date | No | ISO date or unix timestamp. | |
| topic_id | No | Forum topic id. | |
| around_id | No | Context around this id (limit/2 on each side). | |
| before_id | No | Messages older than this id. | |
| max_text_chars | No | Maximum characters of message text per message. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||