get_messages
Retrieve recent messages from any Telegram chat, with optional search and pagination controls.
Instructions
Read recent messages from one chat.
Args: chat: Chat id, @username, or exact/substring title. limit: Max messages (default 30, capped at 200). before_id: Only messages older than this message id (pagination). search: Optional full-text filter within the chat.
Returns message dicts (id, chat_id, date, sender_id, text, has_media, media_type).
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": "get_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat | Yes | ||
| limit | No | ||
| search | No | ||
| before_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |