Skip to main content
Glama
Eweol

telegram-bot-mcp

by Eweol

list_chats

Retrieves all known Telegram chats from bot updates and static configuration, providing chat IDs for use with messaging tools. If a chat is missing, returns instructions to add it.

Instructions

List all known chats the bot can send messages to.

Combines two sources:

  • Persistent discovery: fetches new Telegram updates, extracts chats, and saves them to disk. Subsequent calls return the cached list instantly plus any newly discovered chats.

  • Static config: chats defined via the KNOWN_CHATS environment variable (format: "Name=chat_id,Name2=chat_id2") are always included.

Returns a dict with:

  • chats: list of {chat_id, name, type, username, source}

  • hint: what to tell the user if their desired chat is not in the list

Use the chat_id value with send_message and other tools. If the desired chat is missing, communicate the hint to the user and call list_chats again after they have followed the instructions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses side effects (fetches new Telegram updates, saves chats to disk), caching behavior (subsequent calls return cached list plus new), and return structure (chats list with fields, hint key). This is strong behavioral disclosure, though it slightly understates the network I/O implication and doesn't mention rate limits.

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?

Well-structured with headers (Persistent discovery, Static config) and a clear returns section. The content is dense but organized. Could arguably drop the 'hint' formatting line ('"Name=chat_id..."') to tighten, but the format example adds genuine value. Slightly verbose but every section earns its place.

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 zero-parameter tool with an output schema, the description is remarkably complete. It documents both data sources, the caching/refresh behavior, the return structure with field names and types, the 'hint' semantics, and follow-up instructions. Given the tool's complexity (multi-source list with side effects), this is thorough and self-sufficient.

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?

The tool has zero parameters, so there is nothing for the schema to document. The description compensates by fully explaining the return dict structure (chats with fields, hint), which effectively serves as the parameter/output documentation. Baseline 4 is appropriate for a zero-param tool with a well-documented output.

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?

Description states a specific verb+resource ('List all known chats the bot can send messages to') and clearly distinguishes from siblings. It clarifies it returns chats usable with send_message and other tools, differentiating from get_chat/get_chat_member_count which operate on a specific chat. The scope ('known chats') is well defined.

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?

The description explains when to use this tool (to discover what chats the bot can message) and provides clear context for the two data sources (cached discovery + static config). It also gives guidance on what to do when a desired chat is missing (communicate hint, call again). However, it doesn't explicitly name alternative tools to use instead, though the sibling context makes this somewhat implicit.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Eweol/telegram-bot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server