Tools · Files and code
download_file
Changes thingsDownload a file (binary-safe: zip, csv, image, pdf, …) from an http(s) URL to local disk.
When to use: Use this to save a file from a URL to disk. For reading a web page's text, use open_url instead.
Example
Run for real by scripts/tool-examples.py in a small demo project, with Haiku 5.5 where the tool calls a model. The output is exactly what the tool returned.
The call
{
"tool": "download_file",
"arguments": {
"url": "https://example.com/",
"path": "downloads/example.html"
}
}Real output
Downloaded 577 bytes → <project>/.shipit_workspace/downloads/downloads/example.html (text/html)
Parameters
| Name | Type | Description |
|---|---|---|
| url* | string | http(s) URL of the file |
| path | string | Optional destination filename or relative path (defaults to a name derived from the URL, saved in the downloads workspace). |
| overwrite | boolean | Replace an existing file |
* required
More in Files and code
Read, search and edit the project; run commands, code and git.