telegram_archive_sync
Copies one Telegram chat into a local SQLite archive so future questions don't hit Telegram; repeat runs fetch new messages first, then backfill older history.
Instructions
Effect local_write: it writes a SQLite file on this machine, never anything on Telegram. Use when the user wants one chat copied to the local archive so later questions do not hit Telegram. Do not use this to search that copy; call telegram_archive_search after a sync, or telegram_chat_read for a live page. One chat per call, named explicitly — there is no background sync and nothing is archived that was not asked for. A repeat call fetches only what is new (the stored watermark bounds the request) and then backfills older messages until the per-call budget runs out; complete says whether the beginning of the history has been reached. Attachments are never downloaded, only their metadata. The read policy is checked before the first request, and again on every read of the archive afterwards.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat | Yes | Chat id, @username, or t.me link. Only this chat is archived — there is no bulk or background sync, by design. | |
| limit | No | Ceiling on messages fetched in this call. New messages are taken first, then older ones are backfilled. Repeat the call to continue; `complete` says whether the beginning of the history has been reached. | |
| account | No | Account label to use. Omit when exactly one account is configured. |