Search messages
search_messagesSearch archived Telegram messages and file names by keyword, then filter by chat, sender, date, or media to find relevant conversations and open specific messages.
Instructions
Keyword search over all archived messages and file names, newest first, grouped by chat. Returns message ids to open with get_messages(around_message_id=...).
query: 1 to 3 distinctive words; every word must match, as a prefix ("audit" also finds "audits"). If no message has all words, messages with any of them are returned. Use "quoted phrases" and OR for alternatives (launch OR release). Not semantic: search for words the messages would contain, not for the question. chat: chat id, @username or part of a title. sender: part of a sender name or username. since/until: "24h", "7d", "2026-09-01" or an ISO timestamp. media: only messages with an attachment: "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 | No | ||
| limit | No | ||
| media | No | ||
| query | Yes | ||
| since | No | ||
| until | No | ||
| sender | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |