download_file
Download an attached file from a chat message to local disk and receive its saved path. Safely stores under downloads folder, sanitizing filenames and avoiding duplicates.
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 | |||