search_messages
Search Telegram chats by query with full-text or substring modes, filtering by chat, sender, and date range.
Instructions
Full-text search across all chats (or one chat). mode=fts uses stemmed Russian/English search with websearch syntax ("a b" phrase, -word exclusion, OR); mode=substring is a plain case-insensitive substring match.
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_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | fts | |
| limit | No | ||
| query | Yes | ||
| chat_id | No | ||
| to_date | No | ||
| from_date | No | ||
| sender_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |