Skip to main content
Glama
Automata MCP

Automata MCP

Download Telegram media

download-telegram-media
Read-onlyIdempotent

Downloads the photo, video, audio, sticker, or document attached to a Telegram message using its chat ID and message ID, returning small files inline or a temporary URL for larger ones.

Instructions

[Telegram] Download the file a Telegram message carries — a photo, video, video note, voice message, audio file, sticker or document. Pass the chatId and the message id exactly as read-telegram-messages returned them; messages with a file carry media. Images come back as images and other files as embedded files, when small enough; a larger file comes back as a url that works for ten minutes when fetched with this connection's Authorization header, and only for this token (a client that puts the token in the URL path cannot follow it: use inline). delivery chooses: auto (default) inlines small files, url always returns a link without fetching the file first (a file that turns out too large or not downloadable is refused when the link is followed), inline never does. Self-destructing media is not downloadable, and the account must be online (get-telegram-status). Fetch only what the task needs: each download — inline, or a link followed — fetches the file again.

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": {
      "chatId": "<chatId>",
      "messageId": "<messageId>"
    },
    "name": "download-telegram-media"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatIdYesChat id from list-telegram-chats or read-telegram-messages, as a string
reasonNoOne sentence: why you are calling this tool, i.e. what the user asked for. Do not include names, contact details, message text or other personal data.
deliveryNoauto: inline when small, else a signed URL. inline: never a URL. url: always a URL.auto
messageIdYesThe message `id` from read-telegram-messages

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description discloses non-obvious behavior: returned URLs expire in ten minutes, work only with this connection's Authorization header for this token, and cannot be followed by clients that put the token in the URL path. It also reveals that `url` mode returns a link without fetching first and may be refused later when followed, and that repeated downloads re-fetch the file.

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?

Purpose is front-loaded and nearly every clause carries information the agent cannot get elsewhere. It is dense and a bit long for one paragraph, and the `delivery` sentence partially restates the enum descriptions in the schema, but no sentence is filler.

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?

With no output schema, the description still explains the return shapes — images as images, small files as embedded files, large files as a ten-minute URL — plus the failure cases (self-destructing media, offline account, refused link). Nothing an agent needs to call this correctly or interpret the result is missing.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: it ties `chatId`/`messageId` to their source in read-telegram-messages and expands `url` mode with the caveat that an oversized or non-downloadable file is refused when the link is followed. The `reason` parameter is left entirely to the schema, which keeps this from a 5.

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?

The description opens with a specific verb and resource — 'Download the file a Telegram message carries' — and enumerates the media kinds it covers (photo, video, video note, voice, audio, sticker, document). It also implicitly separates itself from read-telegram-messages by pointing at the `media` field that tool returns, and the '[Telegram]' prefix distinguishes it from download-whatsapp-media.

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?

It states where the inputs come from ('exactly as read-telegram-messages returned them'), gives a precondition (the account must be online, via get-telegram-status), an exclusion (self-destructing media is not downloadable), and explicit selection guidance for the three `delivery` modes. It also adds a consumption rule — 'Fetch only what the task needs: each download … fetches the file again' — which shapes when to call at all.

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