Skip to main content
Glama

Download files

download_files

Download 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

TableJSON Schema
NameRequiredDescriptionDefault
filePathNoOptional 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.
referenceYesSwarm reference hash

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.5

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral disclosure burden. It does disclose mode-dependent behavior ('saves them to disk (in stdio mode) or returns the file list') and that it handles folder manifests. It does not mention overwrite behavior, permissions, or error cases, but the core surprising behavior is covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the core purpose, then usage guidance, then the sibling routing rule. Every sentence contributes actionable information with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with two parameters, no output schema, and no annotations, the description covers the main usage scenario, mode-dependent behavior, and alternatives. It does not specify what the returned file list looks like or what happens on failure, but enough information is present for an agent to decide to call it and pass the required reference parameter.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds context by explaining that files from a manifest are written into the destination folder, and it clarifies the stdio-mode dependency, but it largely restates what the schema already documents. It does not materially improve on the parameter descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Download a file or folder from a Swarm reference'), and further specifies that it handles both single files and folder manifests. It also distinguishes itself from download_data by naming the alternative and explaining when to prefer it.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit usage conditions are given: use this tool when the user asks to download and mentions 'file', 'files', 'folder', or does not specify a data type. It also gives a clear exclusion rule: prefer download_data only when raw text/string content is explicitly requested. This is strong routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.