Skip to main content
Glama
secure-telegram-mcp

secure-telegram-mcp

List forum topics

list_topics
Read-only

Retrieve topics from an in-scope Telegram forum supergroup, ordered by recent activity, to get topic IDs and metadata for targeting messages, searches, or reads within specific topics.

Instructions

List the topics of one in-scope forum supergroup (a chat whose get_chat_info/list_dialogs forum flag is true), most recently active first, up to limit (no pagination — larger forums are truncated). Returns topic metadata (topic_id, title, unread count, closed, pinned, last message id); topic_id 1 is the General topic. Pass a topic_id to get_messages / search_messages / send_message to work within that topic. Fails on non-forum chats. Titles are untrusted and emitted under topic_title.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "peer": "<peer>"
    },
    "name": "list_topics"
  }
}

Input Schema

NameRequiredDescriptionDefault
peerYesThe in-scope forum supergroup whose topics to list (get_chat_info isForum must be true).
limitNoPage size, clamped to [1, 100] (default 20).

Output Schema

NameRequiredDescriptionDefault
topicsYesThe forum topics, most recently active first.
chat_idYesCanonical id of the forum supergroup the topics belong to.
truncatedNoTrue when the page was cut to fit the output byte cap; re-query with a smaller limit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/non-destructive/openWorld, and the description adds genuinely non-obvious behavior: most-recently-active ordering, no pagination so large forums are truncated, topic_id 1 being General, and titles being untrusted and emitted under `topic_title` (an injection-safety note). This is exactly the context annotations cannot convey.

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?

Front-loaded with the verb and resource, and every clause carries information (scope, ordering, truncation, downstream use, failure mode, trust caveat). It is dense, though — the nested parenthetical for the forum precondition and the multi-clause second sentence make it slightly harder to scan than it needs to be.

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 2-parameter read tool with an output schema, this covers everything an agent needs: eligibility precondition, ordering, truncation, the shape of returned metadata, the sentinel topic_id, downstream consumers of topic_id, and the untrusted-title caveat. Nothing material is missing.

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 both parameters are already documented; baseline would be 3. The description still adds semantics beyond the schema by framing `limit` as a truncation point ("up to `limit` (no pagination — larger forums are truncated)") and by tying `peer` to the forum-flag precondition and topic_id 1 to General.

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 ("List the topics of one in-scope forum supergroup"), plus ordering, a hard scope constraint (forum flag true), and a failure mode for non-forum chats. It is clearly separable from siblings like list_dialogs (chats) and get_messages (messages within a topic).

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 the prerequisite discovery path (get_chat_info/list_dialogs forum flag must be true) and explicitly routes downstream work: "Pass a topic_id to get_messages / search_messages / send_message to work within that topic." It also declares the when-not (fails on non-forum chats) and the truncation limit for large forums.

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