Skip to main content
Glama
telegram-archive-mcp

telegram-archive-mcp

by GeiserX

Chat statistics

get_chat_stats
Read-onlyIdempotent

Retrieve statistics for a single chat, including message and media counts, total size, and first/last message dates, to assess its archived history.

Instructions

Get the archive's statistics for one chat: how many messages and media files it holds, their total size, and the dates of its first and last message. Use telegram-archive://stats for the totals of the whole archive.

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

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

No arguments

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 statistics for"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: +{
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is fully covered and the description needn't repeat it. What the description adds is mostly a restatement of the returned fields, which the output schema already carries, and it never addresses freshness or the relationship to refresh_stats (i.e., whether the numbers are cached or when they go stale) — the one behavioral trait an agent would actually still need.

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?

Two sentences, zero filler: the primary behavior and its returned fields come first, and the scope alternative comes second. Nothing is repeated from the structured fields verbatim, and there is no preamble.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With a full output schema, rich annotations, and a single well-documented parameter, the description covers what is needed to select and invoke the tool. The only omission is the interplay with refresh_stats — whether these stats are precomputed and how they become current — which matters for a stats reader but is not required to call it correctly.

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 the chat_id property already explains that it is an opaque ref from list_chats or search_all_chats, not the numeric Telegram id. The description says only 'for one chat' and adds no further meaning, so the 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?

Specific verb plus resource ('Get the archive's statistics for one chat') followed by an enumeration of exactly what statistics are returned (message count, media count, total size, first/last message dates). This clearly separates it from retrieval siblings like get_messages or get_media, which return content rather than aggregates.

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?

It explicitly routes the agent elsewhere for the other scope: 'Use telegram-archive://stats for the totals of the whole archive,' which is a genuine use-this-vs-that boundary. It stops short of naming sibling tools (e.g., refresh_stats, list_chats as the source of chat_id) or stating prerequisites, so it is clear context without full exclusions.

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