tg_search_index
Search a local SQLite FTS5 cache of Telegram messages for offline lookups, returning highlighted snippets and links; filter by chat and use prefix or raw FTS5 queries.
Instructions
Search the local FTS5 index built by tg_index_chat.
Works without network when chat is a numeric id or a known username.
Returns highlighted snippets and links. This is a cache, not a substitute
for server-side search over unindexed chats.
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": "tg_search_index"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat | No | Limit to one chat (ref or numeric id). | |
| mode | No | auto = safe prefix query, raw = raw FTS5 MATCH syntax. | auto |
| limit | No | ||
| query | Yes | Search query. The default mode treats words as prefixes and ANDs them. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||