download_file
Downloads a CTFd challenge attachment to a local machine using a file URL or site-relative path, with an optional destination directory.
Instructions
Download a challenge attachment to the local machine.
Challenge detail (challenge tool) returns a files array with
site-relative paths like /files/<hash>/<name> (signed URLs on some
deployments). Pass one of those values here.
Args: file_url: absolute http(s) URL or site-relative path to the file. dest_dir: optional local directory to store the file in (default: CTFD_DOWNLOAD_DIR or ./downloads).
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": {
"file_url": "<file_url>"
},
"name": "download_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dest_dir | No | ||
| file_url | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |