search_regex
Find messages in Telegram's local cache by matching a regex pattern, with optional chat and time filters for precise results.
Instructions
Search cached messages using a regex pattern (runs locally, not against Telegram API)
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": {
"pattern": "<pattern>"
},
"name": "search_regex"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | ISO datetime — only messages after this time | |
| limit | No | ||
| before | No | ISO datetime — only messages before this time | |
| chat_id | No | Optional: search only this chat | |
| pattern | Yes | Python regex pattern |