List Telegram Messages
tg_list_messagesRead messages across your Telegram accounts, oldest first. Page with after_cursor: pass back the next_cursor you were given to see only what has arrived since. Use this to catch up after being notified of a new message. Narrow with account_id, chat, and since/until (until is exclusive). When a poll finds nothing new, wait about 30 seconds before the next one. For WhatsApp numbers use wa_list_messages.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "tg_list_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat | No | only this conversation — the chat's Telegram id (<id>@telegram; a group -<id>@telegram, a channel or supergroup -100<id>@telegram) | |
| limit | No | how many to return, 1-200; defaults to 50 | |
| since | No | only messages sent at or after this time: RFC3339 with a zone, or a date (2026-10-01 = midnight UTC); omit for no lower bound | |
| until | No | only messages sent BEFORE this time — exclusive; same formats as since; omit for no upper bound | |
| account_id | No | only this Telegram account's messages, from wa_list_accounts; omit for every Telegram account | |
| after_cursor | No | return messages after this cursor; omit or 0 to start from the beginning | |
| include_history | No | also return imported history; off by default. With it on, a page is in storage order rather than time order — sort by at | |
| include_media_urls | No | also return attachment.media_url on each available attachment — a time-limited (1h) signed URL to GET the bytes with plain HTTP instead of a tg_get_media call; off by default |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hint | No | present when the read found nothing new: wait before polling again | |
| refusal | No | present only when the request was declined; next_cursor is then your after_cursor, unchanged | |
| has_more | Yes | true when the page was full and more may be waiting | |
| messages | Yes | messages in order, oldest first | |
| next_cursor | Yes | pass this as after_cursor next time to get only newer messages | |
| account_notices | No | present when a number this read covers is not working: new messages are not arriving on it; says why and what to do |