Skip to main content
Glama

Export

tg_export

Export a Telegram chat's complete file list or message history to CSV, JSON, JSONL, or Markdown in the background, returning a task ID and output path for later reading.

Instructions

Export a chat's complete file list (what=files) or message history (what=messages) to csv/json/jsonl/md in the background. Returns task_id and output_path; read the file when the task is done.

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": "<chat>"
    },
    "name": "tg_export"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatYesChat: @username, username, t.me link, t.me/c/<id> link, or numeric id such as -100123…
whatNofiles
limitNoMax rows; omit for all
sinceNoStart date, ISO (e.g. 2025-01-01).
typesNoFile kinds. Default: everything except stickers.
untilNoEnd date, ISO.
formatNocsv
accountNoAccount id (see tg_list_accounts). Defaults to the default account.
extensionsNoExtensions, e.g. ["zip", "mp4"].
max_size_mbNo
min_size_mbNo
oldest_firstNo
name_containsNoFile name or caption contains (case-insensitive).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false, destructiveHint=false, openWorldHint=true; the description adds real behavioural detail beyond that — execution is asynchronous and in the background, and the call returns a task_id plus an output_path rather than the data itself. It still omits where output_path lives (server-side vs local), whether output files persist or are cleaned up, and whether there are size or rate limits on large exports.

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 with no waste: the first front-loads the verb, the two modes, and the formats; the second front-loads the async contract and the follow-up action. Nothing is repeated from the schema or annotations.

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?

For a 13-parameter asynchronous export tool with no output schema, the description covers the return contract at a high level (task_id, output_path) but leaves gaps: no pointer to the task-tracking siblings, no statement about where files are written or how they are named, and no guidance on behaviour when limit/since/until are omitted. It is adequate to invoke the tool but not to complete the full async loop unaided.

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 62%, so the schema already documents chat, limit, since, until, account, types, name_contains, and extensions. The description only adds meaning for `what` (files vs messages) and reiterates the format set, leaving the filter semantics (size bounds, oldest_first, extension matching) entirely to the schema — the baseline 3 is appropriate for this partial coverage.

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?

The description names a specific verb (export) plus the two exportable resources (file list via what=files, message history via what=messages) and the four output formats, so the agent knows exactly what the tool produces. It stops short of differentiating itself from close siblings such as tg_list_files, tg_extract, or tg_search_files, so the agent must infer that this is the 'bulk, background' path.

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?

It does say which mode to pick (what=files vs what=messages) and gives a usable workflow hint: 'read the file when the task is done.' However, it never names alternatives or exclusions — nothing tells the agent to prefer tg_list_files for a quick listing or tg_extract for content extraction, nor which sibling to poll (tg_tasks, tg_wait_tasks) for the task_id.

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