Skip to main content
Glama
telegram-archive-mcp

telegram-archive-mcp

by GeiserX

Recalculate archive statistics

refresh_stats
Idempotent

Recalculate archive-wide statistics on demand, scanning the entire archive to return chat, message, and media counts plus total size. Use when cached totals are insufficient.

Instructions

Make the viewer recalculate the archive-wide statistics now and return them (chat, message and media counts, total size). It scans the whole archive, so it can take a while and load the viewer's database; it changes no message. Needs the viewer's master login. The cached totals in telegram-archive://stats are usually enough. Hidden when the server runs with READ_ONLY=1.

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

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.4.1
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Goes well beyond annotations by disclosing cost (full archive scan, slow, loads the viewer's database), the auth prerequisite (master login), and the mutation boundary ('changes no message'), which reconciles the readOnlyHint=false annotation with a non-destructive operation. It stops short of saying what actually changes on the viewer side (only cached totals?), leaving a small gap.

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?

Five short sentences, front-loaded with what/how-expensive/requirements/alternative/availability. Every clause carries decision-relevant information: cost, auth, cache alternative, read-only gating.

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?

Output schema exists, so return values need not be detailed, yet the description still names the main figures. Cost, auth, side-effect profile, preferred alternative, and availability constraint are all covered for a zero-parameter 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?

The tool takes zero parameters, so there is nothing for the description to disambiguate; baseline 4 applies. The description correctly implies the call is unconditional and immediate ('now').

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 concrete verb+resource ('recalculate the archive-wide statistics') and enumerates what it returns (chat, message and media counts, total size). The 'archive-wide' scoping distinguishes it from the sibling get_chat_stats, which is per-chat.

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?

'The cached totals in telegram-archive://stats are usually enough' explicitly routes the agent to the cheaper alternative and names the condition that selects it. It also declares when the tool is unavailable ('Hidden when the server runs with READ_ONLY=1'), removing a whole class of failed calls.

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