Skip to main content
Glama

Download

tg_download

Queue Telegram files for parallel, resumable download by message links, chat IDs, or filters, and get task IDs immediately for tracking.

Instructions

Queue files for download (parallel connections, resumable) and return task ids immediately. Three ways: 1) links=[message links]; 2) chat + message_ids; 3) chat + filters + limit (batch). Large batches above the user's limit wait for approval in the console (the result says requires_approval). Check size first with tg_list_files.

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

Input Schema

NameRequiredDescriptionDefault
chatNoChat: @username, username, t.me link, t.me/c/<id> link, or numeric id such as -100123…
limitNoMax files when downloading by filter
linksNoMessage links
sinceNoStart date, ISO (e.g. 2025-01-01).
typesNoFile kinds. Default: everything except stickers.
untilNoEnd date, ISO.
subdirNoSub-folder under the download directory
accountNoAccount id (see tg_list_accounts). Defaults to the default account.
extensionsNoExtensions, e.g. ["zip", "mp4"].
max_size_mbNo
message_idsNo
min_size_mbNo
oldest_firstNo
include_albumNoAlso download the other items of albums
name_containsNoFile name or caption contains (case-insensitive).
complete_archivesNoFor split archives (x.7z.001, x.part1.rar…) also queue the other volumes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only declare non-read-only, non-destructive, open-world; the description adds genuinely new behavior: parallel connections, resumability, immediate task-id return, and the fact that oversized batches block on console approval with a requires_approval result field. It does not state the destination directory semantics or what happens to partially completed tasks, but the key async and gating behavior is disclosed.

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?

Roughly four sentences, front-loaded with what the tool does and returns, then the enumerated input modes, then the approval caveat, then the prerequisite sibling. The numbered list is the most compact way to present three mutually exclusive targeting paths, and there is no filler.

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?

For a 16-parameter async mutation with no output schema, the definition covers the essentials: what comes back (task ids), the alternative input shapes, and the approval branch an agent must handle. It stops short of naming the follow-up task-control tools (tg_tasks/tg_wait_tasks) that an agent needs after receiving task ids, which slightly limits end-to-end guidance.

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?

With 16 optional parameters and 75% schema coverage, the schema documents most fields directly, but it cannot express that chat/links/message_ids/filters are mutually exclusive alternative targeting modes — the description supplies exactly that. Filter-oriented fields (limit, types, sizes, name_contains) are implicitly grouped by the "chat + filters + limit (batch)" phrasing, adding meaning beyond the flat schema.

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 opens with a specific verb and resource ("Queue files for download") plus a concrete effect ("return task ids immediately"), which tells an agent this is asynchronous, not a blocking fetch. It names three distinct targeting modes, which distinguishes it from search/list siblings, though it does not explicitly contrast itself with tg_plan_download or tg_wait_tasks.

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 gives explicit selection logic among the three input modes (links vs. chat+message_ids vs. chat+filters+limit) and a prerequisite: "Check size first with tg_list_files." It also flags the approval condition for large batches. What is missing is a when-not clause, e.g. when to prefer tg_plan_download or tg_extract over a raw download.

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