Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
chatYesChat id, @username, or t.me link. Only this chat is archived — there is no bulk or background sync, by design.
limitNoCeiling 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.
accountNoAccount label to use. Omit when exactly one account is configured.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations (readOnlyHint=false, openWorldHint=true, idempotentHint=false) are consistent with the description, and the description adds substantial context they do not carry: local-only writes, no background/bulk sync, watermark-bounded incremental fetch plus backfill, and metadata-only attachments. It does not cover failure modes or rate limits, and the 'read policy checked on every read' claim is stated but not elaborated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The most important information (local write, one-chat scope) is front-loaded, and each sentence carries a distinct fact. It runs long at roughly six clauses, and the sync/backfill/complete material partly duplicates the `limit` schema text rather than compressing it.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutating, open-world, non-idempotent write tool with no output schema, it covers the essentials: scope, repeat-call semantics, attachment handling, and policy checks. It mentions the `complete` field but does not describe the rest of the response, which leaves a small gap on what a caller gets back.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, and the description earns above it by explaining the interaction the schema only hints at: new messages first, then older backfill, with `complete` signalling whether history start was reached. It adds little for `account` and `chat` beyond the schema, so it is not a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource up front ('Effect local_write: it writes a SQLite file on this machine, never anything on Telegram') and immediately scopes it to 'one chat copied to the local archive.' It also names the siblings it is NOT (telegram_archive_search, telegram_chat_read), so an agent can disambiguate without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use ('when the user wants one chat copied to the local archive so later questions do not hit Telegram') and explicit when-not ('Do not use this to search that copy'), each paired with the named alternative tool. The 'no background sync, nothing archived that was not asked for' line removes any ambiguity about scope.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.