telegram_download_file
Download a Telegram file by its file_id. Save to disk or get base64-encoded content with filename and size.
Instructions
Download a file from Telegram using its file_id.
If save_path is provided, writes the file to disk and returns the path. Otherwise returns the file content as base64-encoded string.
Use telegram_get_file_info first if you only need the download URL.
Args: params (DownloadFileInput): file_id, optional save_path.
Returns: str: JSON with saved_path or base64 content + filename and size.
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": {
"params": "<params>"
},
"name": "telegram_download_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |