Skip to main content
Glama
dikaglorya

telegram-mcp

by dikaglorya

Write the Telegram credentials file

telegram_setup

Create or update the .env file for telegram-mcp with Telegram API ID, API hash, optional phone, and full-chat access settings; restart the server to apply changes.

Instructions

Create or update the .env file this server loads: TELEGRAM_API_ID, TELEGRAM_API_HASH, optional TELEGRAM_PHONE, and TELEGRAM_ALLOW_ALL_CHATS. Get api_id/api_hash from https://my.telegram.org/apps. Never call this with a hash the user pasted in chat unless they asked you to; the hash is written to disk and never returned. Existing other keys in .env are preserved. The MCP server must be restarted to pick up new values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiIdNoNumeric App api_id from my.telegram.org/apps, e.g. "1234567".
forceNoRewrite an already-configured .env. Only when the user asks.
phoneNoInternational phone number with leading +, e.g. +15551234567.
apiHashNoApp api_hash from my.telegram.org/apps (32 hex chars).
allowAllChatsNoFull access to every chat the account can reach. true unless the user wants a restriction.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations confirm this is a non-read-only write, and the description adds important behavior beyond them: credentials are written to disk, the hash is never returned, unrelated `.env` keys are preserved, and the server must restart. These are exactly the side effects an agent needs to know.

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

Conciseness5/5

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

Four compact sentences, front-loaded with the action and key list, followed by credential source, safety warning, preservation behavior, and restart requirement. No wasted text.

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

Completeness5/5

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

For a secret-writing configuration tool with no output schema, the description covers what is written, where to get values, secret-handling constraints, preservation of other keys, and restart semantics. An agent has enough to call it correctly and safely.

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

Parameters3/5

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

Schema description coverage is 100%, so all five parameters are already documented in the schema. The description maps them to environment keys and adds the credential source, but adds limited syntax or meaning beyond the schema's own parameter descriptions.

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+resource: create or update the `.env` credentials file the server loads. It names the exact credential keys and makes clear this is bootstrap/configuration work, distinguishing it from runtime Telegram sibling tools.

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

Usage Guidelines4/5

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

Explains where to obtain api_id/api_hash and gives a clear safety rule: never call with a hash pasted in chat unless explicitly requested. It also notes the server restart requirement. It does not explicitly discuss alternatives such as status/doctor tools, but setup has no true sibling alternative.

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

Deploy Server

Other Tools