Download a file to disk
downloadSave any file from a URL to a local auto-expiring directory, returning a file path for immediate use. Ideal for retrieving installers, datasets, or images while keeping your filesystem clean.
Instructions
Save a file from a URL to a local, auto-expiring download directory.
Downloads are enabled by default and saved under
`SEARCH_MCP_CACHE_DIR/downloads`. Set `SEARCH_MCP_DOWNLOAD_ENABLED=false`
to disable them or `SEARCH_MCP_DOWNLOAD_DIR` to override the destination.
Best for:
- Keeping an actual file (installer, dataset, archive, image) rather than
its text.
- Handing a path to another tool that needs a real file on disk.
Not recommended for:
- Reading a document's contents -> use `read_doc`, which parses it without
touching the filesystem.
- Looking at a web page -> use `fetch`.
- Viewing an image -> use `fetch(inline=True)`.
Returns:
- markdown (default): where the file was saved, its size and type.
- json: {url, saved_path, media_type, bytes_size, sha256, expires_in_hours}.
An expires_in_hours value of 0 means TTL cleanup is disabled.
Retention: files older than SEARCH_MCP_DOWNLOAD_TTL_HOURS (default 24) are
deleted before the next download and at startup. A value of 0 disables TTL
cleanup. Otherwise, treat the path as short-lived and copy it elsewhere if
you need to keep it.
Args:
url: Absolute http(s) URL of the file to save.
format: "markdown" or "json".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| format | No | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |