Download media
telegram_download_mediaDownload a Telegram message attachment to the local media directory and return its path and size. Limit file size with an environment variable to avoid large transfers.
Instructions
Download the attachment of a message to the local media directory. Returns local path + size. Set TELEGRAM_MAX_DOWNLOAD_BYTES in env for a cap (0 = unlimited).
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>",
"messageId": "<messageId>"
},
"name": "telegram_download_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat | Yes | ||
| fileName | No | ||
| messageId | Yes |