search_messages
Search Telegram messages by text across all chats or within a specific chat. Returns message details including text, sender, and media type.
Instructions
Search messages by text — globally or within one chat.
Args: query: Non-empty search string. chat: Optional chat id/@username/title to scope the search. limit: Max results (default 30, capped at 200).
Returns message dicts (id, chat_id, date, sender_id, text, has_media, media_type).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat | No | ||
| limit | No | ||
| query | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |