Download files
download_filesDownload a file or folder from a Swarm reference. Saves to disk or returns a file list for folder manifests, covering all download requests.
Instructions
Download a file or folder from a Swarm reference. Handles both single files and folder manifests, saves them to disk (in stdio mode) or returns the file list. Use this tool whenever the user asks to "download" from a reference and mentions "file", "files", "folder", or does not specify the data type. Prefer this tool over download_data unless the user explicitly asks for the raw text/string content behind a reference. This is the safe default for downloads when the reference type is unknown.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | No | Optional destination FOLDER (not a filename) to save the downloaded content into (only available in stdio mode). Files from the manifest are written inside this folder using their original names. Absolute paths are recommended; relative paths resolve against the server's current working directory. If omitted, files are saved into the server's current working directory. | |
| reference | Yes | Swarm reference hash |