Search Telegram messages
search-telegram-messagesSearch synced Telegram messages by keyword across all chats or one chat, newest first; case-insensitive matching requires every word in the message text or caption.
Instructions
[Telegram] Find synced Telegram messages containing given words, newest first, across every chat unless chatId narrows it to one. Matching is case-insensitive and every word must appear in the same message. Matches message text and media captions only, against the current wording of edited messages; deleted messages are not searchable. Only synced history is searched, so finding nothing is not proof a message does not exist — list-telegram-chats shows which chats have incomplete history. A match you sent is marked fromMe and carries no author. When truncated is true there were more matches than returned: narrow the search rather than reporting these as all of them.
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": {
"query": "<query>"
},
"name": "search-telegram-messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | How many matches to return | |
| query | Yes | Words to look for. All of them must appear in the message. | |
| since | No | Only messages at or after this date, e.g. 2024-03-01 or 2024-03-01T12:00:00Z | |
| until | No | Only messages at or before this date | |
| chatId | No | Restrict to one chat, using a `chatId` from list-telegram-chats. Omit to search every chat. | |
| fromMe | No | true for only messages you sent, false for only messages you received |