Skip to main content
Glama
telegram-archive-mcp

telegram-archive-mcp

by GeiserX

List archived chats

list_chats
Read-onlyIdempotent

Browse archived Telegram chats, most recent first, to retrieve each chat_id reference needed by other archive tools. Filter by name, archived status, or folder and page through results.

Instructions

List archived Telegram chats, most recent first. Use this first: each chat's ref is the chat_id the other tools take. Each row also carries id (the numeric Telegram chat id), type, accounts (the archive account ids holding the chat), and its title or name. Narrow it with search (by name), archived or folder_id (from list_folders). The answer is {chats, total, limit, offset, has_more}; page with offset while has_more is true.

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_chats"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum chats to return, 1 to 500 (default 100).
offsetNoNumber of chats to skip (default 0).
searchNoKeep chats whose title, first or last name, or username contains this text, case-insensitive (e.g. "climbing").
archivedNotrue keeps only chats archived in Telegram, false only the others. Omit for both.
folder_idNoKeep only the chats of one Telegram folder; the id comes from list_folders.

Output Schema

NameRequiredDescriptionDefault
chatsNoOne row per chat: ref (the chat_id other tools take), id (numeric Telegram chat id), type, accounts, and its title or name.
limitNo
totalNoChats matching the filters, across all pages.
offsetNo
has_moreNoTrue when another page follows; call again with offset + limit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changedv0.4.1
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / archived
      Added value: +{
      +  "description": "true keeps only chats archived in Telegram, false only the others. Omit for both.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / folder_id
      Added value: +{
      +  "description": "Keep only the chats of one Telegram folder; the id comes from list_folders.",
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / limit / default
      Added value: +100
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum chats to return (default 100, max 500)"New value: +"Maximum chats to return, 1 to 500 (default 100)."
    • addedInput schema / properties / limit / maximum
      Added value: +500
    • addedInput schema / properties / limit / minimum
      Added value: +1
    • changedInput schema / properties / limit / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / offset / default
      Added value: +0
    • changedInput schema / properties / offset / description
      Previous value: -"Number of chats to skip (default 0)"New value: +"Number of chats to skip (default 0)."
    • addedInput schema / properties / offset / minimum
      Added value: +0
    • changedInput schema / properties / offset / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / search
      Added value: +{
      +  "description": "Keep chats whose title, first or last name, or username contains this text, case-insensitive (e.g. \"climbing\").",
      +  "maxLength": 200,
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "chats": {
      +      "description": "One row per chat: ref (the chat_id other tools take), id (numeric Telegram chat id), type, accounts, and its title or name.",
      +      "items": {
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "has_more": {
      +      "description": "True when another page follows; call again with offset + limit.",
      +      "type": "boolean"
      +    },
      +    "limit": {
      +      "type": "integer"
      +    },
      +    "offset": {
      +      "type": "integer"
      +    },
      +    "total": {
      +      "description": "Chats matching the filters, across all pages.",
      +      "type": "integer"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed2 schema fields changedv0.3.0
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum chats to return (default 100)"New value: +"Maximum chats to return (default 100, max 500)"
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "Number of chats to skip (default 0)",
      +  "type": "number"
      +}
  3. Addedv0.1.3

TDQS

A4.1/5.0
Behavior4/5

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

With readOnly, idempotent and non-destructive hints already declared, the description adds genuinely useful context: the sort order, the meaning of the returned `ref` as the foreign key for other tools, and the pagination contract via has_more. It does not discuss permissions or archive-account scoping limits, so it is strong but not exhaustive.

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?

The most important instruction ('Use this first' plus the ref/chat_id linkage) is front-loaded, then field contents, then filters, then the response envelope. No sentence is redundant given the information each carries.

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?

Although an output schema exists, the description still names the response envelope and keys ({chats, total, limit, offset, has_more}) and explains paging, which is exactly the guidance an agent needs to drive pagination correctly. Combined with full schema coverage, nothing essential is missing.

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 coverage is 100%, so the baseline is 3. The description does add value by explaining that folder_id comes from list_folders and that search matches by name, but it largely restates what the schema already documents in detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('List archived Telegram chats, most recent first') including ordering. It does not name a sibling to distinguish itself from, though it does say 'Use this first', implying a prerequisite role relative to the other tools.

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 sequencing guidance ('Use this first: each chat's ref is the chat_id the other tools take') and names concrete narrowing options. It stops short of saying when a sibling like search_all_chats is the better entry point, so the alternatives are only partially addressed.

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