tg_history
Retrieve Telegram chat history chronologically, with filters for user, search text, topic, and pagination to target specific messages.
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. Twenty is a conversation; raise it when reading a chat properly, not to be safe. 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). saved_from: chat="me" only — read one sub-folder of Saved Messages, the one holding everything forwarded there from this person or channel. List the sub-folders with tg_dialogs(kind="saved"). brief: drop reactions, link cards and edit times. Same messages, about a quarter smaller — for triage, not for reading a chat closely.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat | Yes | ||
| brief | No | ||
| limit | No | ||
| topic | No | ||
| search | No | ||
| before_id | No | ||
| from_user | No | ||
| saved_from | No |