Download Telegram media
download-telegram-mediaDownloads 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
| Name | Required | Description | Default |
|---|---|---|---|
| chatId | Yes | Chat id from list-telegram-chats or read-telegram-messages, as a string | |
| reason | No | One 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. | |
| delivery | No | auto: inline when small, else a signed URL. inline: never a URL. url: always a URL. | auto |
| messageId | Yes | The message `id` from read-telegram-messages |