Skip to main content
Glama
telegram-archive-mcp

telegram-archive-mcp

by GeiserX

List forum topics

get_topics
Read-onlyIdempotent

Lists forum topics (threads) with message counts for a forum supergroup, helping you identify topic IDs for targeted message retrieval.

Instructions

List the forum topics (threads) of a forum supergroup, with message counts. Pass a topic's id as topic_id to get_messages, search_messages or get_messages_by_date to read only that thread. A chat that is not a forum has no topics.

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": {
      "chat_id": "<chat_id>"
    },
    "name": "get_topics"
  }
}

Input Schema

NameRequiredDescriptionDefault
chat_idYesThe chat's ref, as list_chats or search_all_chats returns it (an opaque string; not the numeric Telegram id).

Output Schema

NameRequiredDescriptionDefault
topicsNoOne row per forum topic: id (the topic_id other tools take), title, message_count, last_message_date, is_closed, is_pinned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.4.1
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / chat_id / description
      Previous value: -"Chat ID to get topics from"New value: +"The chat's ref, as list_chats or search_all_chats returns it (an opaque string; not the numeric Telegram id)."
    • addedInput schema / properties / chat_id / minLength
      Added value: +1
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "topics": {
      +      "description": "One row per forum topic: id (the topic_id other tools take), title, message_count, last_message_date, is_closed, is_pinned.",
      +      "items": {
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds behavior beyond that: results carry message counts, non-forum chats yield no topics, and the returned ids are the key consumed by three sibling read tools.

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?

Three short sentences, zero filler, with the core purpose front-loaded and the chaining hint and edge case trailing in priority order. Nothing repeats the title or the schema.

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?

An output schema exists, so return shape needn't be described, and the one parameter is fully specified by the schema. Combined with the annotations and the description's chaining guidance, an agent has everything required to decide to call this and to use its output.

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% and chat_id is thoroughly documented in the schema (ref string from list_chats/search_all_chats, not the numeric Telegram id). The description adds nothing about chat_id, and the topic_id it mentions belongs to sibling tools rather than this parameter. Baseline 3 applies.

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 forum topics (threads) of a forum supergroup") plus a distinguishing detail ("with message counts"). The parenthetical "threads" resolves the domain jargon, so an agent can separate this from get_messages and get_pinned_messages immediately.

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?

Explicitly explains the downstream workflow: "Pass a topic's id as topic_id to get_messages, search_messages or get_messages_by_date to read only that thread," which tells the agent why it would call this first. It also gives a when-not condition ("A chat that is not a forum has no topics"), though it doesn't state what to do in that case or how to discover whether a chat is a forum.

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