tg_index
Create a local full-text index of selected Telegram chats to enable offline search. Sync updates the index, status shows indexed content, and drop removes it.
Instructions
Local full-text index of the correspondence, for tg_search(engine="local").
Nothing is indexed on its own — only the chats the owner names here. The index is a plain-text copy of those chats in the project's data/index.db (mode 600); action="drop" deletes it.
Args:
action: "sync" — fetch and index (incremental: only what appeared since
last time, so calling it again is cheap);
"status" — what is indexed, how many messages, when, file size;
"drop" — delete the whole index, or only the named chats.
chats: which chats to sync or drop, up to 25. On sync, omitting them
refreshes everything already in the index; the first sync of a
chat must name it.
since: how deep to go on the first pass — "today" or an ISO date.
limit: how many messages per chat to pull in this call (default 2000,
max 20000). Passing it also means "go deeper", not just "catch up".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chats | No | ||
| limit | No | ||
| since | No | ||
| action | No | sync |