secretary_search
Search archived Telegram direct messages by text across all private chats or within one chat, ranking exact phrase matches before messages containing all words.
Instructions
Search message text across the archive, or within one chat. Full phrase matches come first, then messages with all the words. The bot only sees private chats that wrote to the owner after it was connected (Settings → Chat Automation), and only while the server was running. Groups, channels and older history are never available.
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": "secretary_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat | No | Chat: numeric id, @username, or part of the person's name | |
| limit | No | How many to return, at most 100 (default 20) | |
| query | Yes | Text to look for | |
| since | No | Unix seconds or ISO 8601 date-time | |
| until | No | Unix seconds or ISO 8601 date-time |