Read messages
get_messagesReads one chat chronologically with pagination, time ranges, search context, and media filters so AI can review past messages and draft replies.
Instructions
Read one chat in chronological order, one line per message ([ref], #id, date UTC, sender, text).
Without since/around_message_id you get the newest limit messages (the right call
for "latest from X" or drafting a reply). around_message_id: the context of a search
hit. before_message_id / after_message_id: the limit messages just before or after
that one, to page through history; after_chat: the chat of the after_message_id
message when the paging note names one. since/until: a time range like "7d" or
"2026-09-01". limit: at most 300.
topic: forum topic id or title. media: only messages with an attachment, to list
shared files: "files" (photos, videos, documents, voice, audio), "any", or one of
photo, video, document, voice, audio, sticker, poll, link.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat | Yes | ||
| limit | No | ||
| media | No | ||
| since | No | ||
| topic | No | ||
| until | No | ||
| after_chat | No | ||
| after_message_id | No | ||
| around_message_id | No | ||
| before_message_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |