Skip to main content
Glama
dikaglorya

telegram-mcp

by dikaglorya

Export chat history to a file

telegram_export_history

Export a Telegram chat's message history to JSON, JSONL, or TXT for archiving or passing full conversations to other tools. Returns the saved file path.

Instructions

Dump a chat's message history to a JSON file in the export directory and return the path. Useful for archiving or handing a full conversation to another tool. Newest-first, max 1000.

Input Schema

NameRequiredDescriptionDefault
chatYes
limitNo
formatNojson

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior4/5

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

Annotations cover only readOnlyHint=false and openWorldHint=true; the description supplies the extra behavior an agent needs: output lands in the export directory, the path is returned, results are newest-first, and there is a hard 1000-message ceiling. It does not say whether the file is overwritten on repeat calls or whether the export directory is configurable.

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?

Three short sentences, front-loaded with the action and destination, with no filler. The brevity is close to terse given three undocumented parameters, but every sentence earns its place.

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

Completeness3/5

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

No output schema exists, and the description correctly compensates by stating the return value (the file path). However, for a filesystem-writing tool it never explains the export directory location, overwrite behavior, or how the format enum affects the produced file, leaving gaps an agent would have to discover by trial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden. It covers the limit cap ("max 1000") but omits the default of 200, says nothing about how to address the required chat parameter, and describes the output as "a JSON file" while the schema's format enum also permits jsonl and txt — effectively under-describing or mis-signalling that parameter.

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: dump a chat's history to a JSON file and return the path. The file-export framing implicitly separates it from telegram_get_history and telegram_search_messages, though it never names those siblings explicitly, so the differentiation is left to inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Useful for archiving or handing a full conversation to another tool" gives a use context, but there is no when-not guidance and no named alternative (e.g., use telegram_get_history for inline reading, or telegram_search_messages for targeted lookup). Adequate but leaves the routing decision to the agent.

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

Deploy Server

Other Tools