tg_history
Fetch Telegram chat messages chronologically, with optional filters for sender, text, topic, and pagination.
Instructions
Read messages from one chat, oldest to newest.
Args: chat: chat id, @username, t.me link, exact title, or "me" for Saved Messages. limit: number of messages. before_id: paginate to messages older than this message id. from_user: only messages from this person. search: only messages containing this text. topic: read one forum topic instead of the whole chat (id from tg_topics).
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_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat | Yes | ||
| limit | No | ||
| topic | No | ||
| search | No | ||
| before_id | No | ||
| from_user | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |