download_file
Fetch remote files from HTTP/HTTPS URLs, with support for custom methods, headers, and bodies, and save them securely to the sandbox.
Instructions
DOWNLOAD FILES from the internet using HTTP/HTTPS protocols. Supports GET, POST, and other HTTP methods with custom headers and request body. Downloaded files are automatically saved to the sandbox directory. Use this tool when you need to: 1) Download files from URLs, 2) Fetch remote resources, 3) Download data files, images, documents, 4) Make HTTP requests with custom parameters, 5) Download API responses. All files are stored securely in the sandbox. Keywords: download, fetch, get file, http download, retrieve file, save from url, download from internet. / 从互联网下载文件,使用HTTP/HTTPS协议。支持GET、POST等HTTP方法,支持自定义请求头和请求体。下载的文件自动保存到沙箱目录。用于:1) 从URL下载文件,2) 获取远程资源,3) 下载数据文件、图片、文档,4) 使用自定义参数发起HTTP请求,5) 下载API响应。所有文件安全存储在沙箱中。关键词:下载、获取文件、HTTP下载、从URL保存。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL to download from. Must be a valid HTTP or HTTPS URL. Examples: 'https://example.com/api/report.pdf', 'http://cdn.example.com/data/users.json', 'https://raw.githubusercontent.com/user/repo/main/README.md'. | |
| body | No | Optional request body for POST, PUT, or PATCH requests. Can be JSON, form data, or any text content. For JSON data, make sure to set Content-Type header to 'application/json'. Examples: '{"key": "value"}', 'param1=value1¶m2=value2'. | |
| path | Yes | The file path where the downloaded content will be saved (relative to sandbox directory). Parent directories will be created automatically if they don't exist. The filename can be different from the URL. Examples: 'downloads/my-report.pdf', 'data/user-list.json', 'docs/readme.txt'. | |
| method | No | HTTP method to use for the request. Common methods: GET (default, for simple downloads), POST (for form submissions or API calls), PUT, DELETE, HEAD. If not specified, defaults to GET. | GET |
| headers | No | Optional HTTP headers to include in the request. Useful for authentication, content type specification, or custom headers. Format: key-value pairs. Examples: {'Authorization': 'Bearer token123', 'Content-Type': 'application/json', 'User-Agent': 'MyApp/1.0'}. | |
| timeout | No | Request timeout in seconds. If the download takes longer than this, it will be cancelled. Default is 30 seconds. Increase for large files or slow connections. | |
| skip_tls_verify | No | Skip TLS certificate verification for HTTPS requests. WARNING: This is insecure and should only be used in development environments with self-signed certificates. Never use in production. Default is false (verify certificates). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | Yes | ||
| message | Yes | ||
| success | Yes | ||
| content_type | Yes | ||
| sandbox_path | Yes | ||
| absolute_path | Yes |