Skip to main content
Glama

List Telegram chats

telegram_list_chats
Read-onlyIdempotent

Browse the user's Telegram chats available in Telepath, including private chats, groups and channels, with archive or Session coverage disclosed in the result. Returns chat_id, display name, username, message count and last message time, not message contents. Default 20 chats; archive maximum 200, Session maximum 50. Connected channel inbox archives can supplement Session results; read effective_limit, session_limit, source, coverage and partial. This is a bounded list, not a total chat count. There is no pagination: repeating the same call does not advance. A full page may omit other chats. chat_type filters private chats, groups or channels; group includes supergroups. Session type filtering examines up to 1000 recent account dialogs, not the entire account. Null counts or dates mean unknown, not zero or no activity. Archive counts/dates describe saved/imported messages only. An empty filtered result means no matches in this source coverage, not that the account has no chats. Follow empty_reason and returned setup_required/history_notice; do not infer a lost connection or reconnect a working Session from an empty list. Operational errors are not empty results. For a named person, group or channel use telegram_find_chat; for a catch-up across chats use telegram_recent_messages. This is not a directory of all Telegram users or chats. For a name lookup miss, follow telegram_find_chat guidance: try at most 3 untried name variants before asking for an exact reference. Confirm candidates found via a changed name before reading history or sending. Use an already connected Session where supported; preserve source, coverage and actual errors. Do not suggest connecting or reconnecting Session unless the user explicitly asks for Session setup. Never switch sender automatically or request login codes/passwords in chat.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "telegram_list_chats"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoHow many chats to return. Default 20; archive maximum 200, Session maximum 50. Repeating a call does not fetch a next page.
chat_typeNoFilter by chat type. group includes basic groups and supergroups; channel means broadcast channels.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / limit / description
      Previous value: -"How many chats to return. Default 20."New value: +"How many chats to return. Default 20; archive maximum 200, Session maximum 50. Repeating a call does not fetch a next page."
  2. Changed1 schema field changed
    • addedInput schema / properties / chat_type
      Added value: +{
      +  "description": "Filter by chat type. group includes basic groups and supergroups; channel means broadcast channels.",
      +  "enum": [
      +    "private",
      +    "group",
      +    "supergroup",
      +    "channel",
      +    "channel_dm"
      +  ],
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, open-world and non-destructive, and the description reinforces the idempotency claim with the concrete consequence: 'There is no pagination: repeating the same call does not advance.' It adds genuinely useful behavior beyond annotations: page-size caps per source, archive-inbox supplementation, treating null counts/dates as unknown rather than zero, and distinguishing operational errors from empty results. The only shortfall is that it spends sentences on cross-tool policy (login codes, sender switching) that is not specific to this tool.

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 scoping and non-pagination warnings are front-loaded, which is the right structure. However, the body is a long run-on accumulation of sentences, several of which restate earlier points or address sibling-tool workflows rather than this call.

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?

With no output schema, the description carries the return-shape burden and does so ('chat_id, display name, username, message count and last message time, not message contents'). Combined with coverage/partial/effective_limit semantics and empty-result interpretation, an agent has everything needed to call it and read the result correctly for this two-parameter, zero-required tool.

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 coverage is 100%, so baseline is 3; the description mostly restates the limit and chat_type semantics already in the schema. It does add value beyond the schema, notably that Session type filtering only examines up to 1000 recent account dialogs rather than the whole account, which materially changes how a returned count should be interpreted.

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 ('Browse the user's Telegram chats available in Telepath') with scope (private chats, groups, channels) and explicitly disclaims what it is not ('not a directory of all Telegram users or chats'). It names the sibling tools for adjacent needs (telegram_find_chat for a named person/group/channel, telegram_recent_messages for catch-up), so an agent can route without opening another 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?

Gives explicit when-to-use and when-not-to-use rules plus named alternatives, and adds concrete fallback behavior for a find_chat miss (at most 3 untried name variants before asking for an exact reference). It also tells the agent not to infer a lost connection from an empty list and not to suggest reconnecting a Session unless asked.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources