MCP server for Telegram API access via TDLib, supporting authentication, chat operations, message management, and chat history export to Markdown
26 tools with consistent verb-noun naming (auth_*, get_*, send_*, etc.). All tools have descriptions (10-200 chars, within baseline). Input schemas present with type definitions for all parameters. However, output schemas are NOT documented, critical gap for LLM planning. Parameter descriptions are minimal (avg 40-60 chars vs baseline 72). No enum constraints on categorical parameters (e.g., auth state values). Error handling guidance absent. Security concerns: auth credentials exposed as parameters (auth_set_parameters takes api_id/api_hash directly). No idempotency hints on destructive ops (delete_messages, forward_messages). Tool composition is reasonable (separate auth steps, distinct read/write ops), but multi-step auth flow lacks recovery guidance.
Drive the authentication state machine by one step. Call repeatedly with optional args until state == 'ready'. Auto-fires from env vars (TELEGRAM_API_ID/HASH, TELEGRAM_PHONE, TELEGRAM_2FA_PASSWORD) when present; otherwise returns next_step.required_args identifying what to provide. SMS verification code MUST be supplied via the 'code' arg (never auto-fired).
Step 3: Enter the verification code received via Telegram/SMS
Step 3b: Enter 2FA password (only if two-step verification is enabled)
Step 2: Send your phone number to start authentication
Step 1: Set Telegram API credentials. Get api_id and api_hash from https://my.telegram.org
Check current authentication status. Returns {state, next_step, last_error} where next_step describes what to call next (or null when ready) and last_error reports any auto-fire failure.
Output schemas not documented. LLMs cannot plan downstream tool calls or extract required fields (e.g., what does get_user return? Does it include user_id for chaining to send_message?). Critical for multi-step agent workflows.
Credentials exposed as tool parameters. auth_set_parameters requires api_id and api_hash as direct inputs, these will be logged in agent traces and prompt history. Must use server-side secret injection via environment variables.
No error recovery guidance. Multi-step auth flow (auth_send_phone → auth_send_code → auth_send_password) lacks actionable error messages. If auth_send_code fails, what should the agent do? Retry? Call auth_status? Unclear.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 66 | 2026-07-28+ | v2 |
Delete messages
Export a chat's message history to a Markdown file with day-grouped headings and sender labels
Edit a message you sent
Forward messages from one chat to another
Get detailed info about a specific chat
Get message history from a chat
Get members of a group/supergroup
Get your chat list (recent conversations)
Get your contact list
Get your own Telegram profile info
Get info about a user by ID
Log out from Telegram
Mark messages as read
Pin a message in a chat
Search for chats by name
Search for messages within a chat
Send a text message to any chat (personal, group, channel)
Change a chat's description
Change a chat's title
Unpin a message
Destructive operations lack confirmation or dry-run support. delete_messages and forward_messages can cause data loss but have no confirmation step or idempotency hints. Agents may accidentally delete or forward messages on retry.
Categorical parameters lack enum constraints. auth_run's 'state' field and similar categorical values are described as strings but not constrained to valid options. LLMs may hallucinate invalid state values.