Skip to main content
Glama
secure-telegram-mcp

secure-telegram-mcp

List in-scope dialogs

list_dialogs
Read-only

Lists chats, groups, and channels in scope, returning paginated metadata (ID, title, kind, unread count, pinned, forum status) with a cursor for the next page.

Instructions

List the chats, groups, and channels within this endpoint’s scope. Returns dialog metadata (id, title, kind, unread count, pinned, is_forum) one page at a time; pass back cursor to fetch the next page. When is_forum is true the dialog is a forum supergroup — use list_topics to enumerate its topics. Out-of-scope dialogs are never returned. Titles are untrusted and emitted under chat_title.

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": "list_dialogs"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoPage size, clamped to [1, 100] (default 20).
cursorNoOpaque pagination cursor returned by a prior page; pass verbatim.

Output Schema

NameRequiredDescriptionDefault
dialogsYesThe in-scope dialogs for this page.
truncatedNoTrue when the page was cut to fit the output byte cap; re-query with a smaller limit.
next_cursorNoOpaque cursor for the next page; pass it back verbatim to continue.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond readOnlyHint/openWorldHint, the description discloses the pagination contract (one page at a time, pass cursor back), the scope-exclusion guarantee, and a genuine safety detail: titles are untrusted and emitted under chat_title. That untrusted-content warning is not derivable from annotations or schema and is exactly the kind of thing an agent needs before rendering results.

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?

Four tight sentences, front-loaded with purpose, then pagination, then the forum exception, then the untrusted-title caveat. No filler. Minor deduction because the returned-field enumeration (id, title, kind, unread count, pinned, is_forum) overlaps with the output schema that already exists.

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 agent can call this correctly from the description alone: it knows the scope, the page-size contract, how to continue pagination, when to switch to list_topics, and which field is untrusted. The output schema exists and the description doesn't need to carry return values, making this complete for a two-parameter list 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 the baseline is 3, but the description still adds usable meaning: cursor is described operationally as a value passed back from a prior page, implying round-trip usage rather than a free-form string. The limit/page-size relationship is left entirely to the schema, which prevents a higher score.

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?

Opens with a specific verb and resource ("List the chats, groups, and channels") plus an explicit scope qualifier ("within this endpoint's scope"). This is immediately distinguishable from siblings like get_chat_info (single chat) and list_topics (forum topics), and the parenthetical field list confirms what a dialog record is.

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?

Gives explicit routing: when is_forum is true, use list_topics to enumerate topics instead. It also states the negative condition that out-of-scope dialogs are never returned, which sets expectations. What's missing is any guidance on choosing between this, search_messages, or list_participants for discovery scenarios, so it falls just short of a 5.

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