download_file
Download a file attached to a chat message into the local downloads folder and receive its saved path. Use this to access Telegram attachments from finance discussions, with safe and de-duplicated filenames.
Instructions
Download the file attached to one message to local disk and return its path.
Saves under this project's downloads/ folder by default; dest_dir selects a
subdirectory within that downloads/ folder (relative paths, .., and absolute
paths that resolve outside it are rejected). The filename is sanitized and
de-duplicated against existing files in the target directory.
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>",
"message_id": "<message_id>"
},
"name": "download_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat | Yes | ||
| dest_dir | No | ||
| message_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||