Skip to main content
Glama

hf_download

Download a single file or a full Hugging Face Hub repository to a local directory for offline access, inspection, or local training.

Instructions

Download one file (or, with no filename, a whole repo) from the Hub to the local machine.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "repo_id": "<repo_id>",
      "local_dir": "<local_dir>"
    },
    "name": "hf_download"
  }
}

Input Schema

NameRequiredDescriptionDefault
repo_idYes
filenameNo
local_dirYes
repo_typeNomodel

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the key non-obvious behavior that omitting filename downloads an entire repository — a scope change an agent would not otherwise anticipate. However, it is silent on overwrite behavior for existing content in local_dir, authentication requirements, and the potentially large size/time cost of whole-repo downloads.

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

Conciseness4/5

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

A single well-formed sentence with the two modes front-loaded and no filler. It is lean to the point of under-specification rather than being verbose, which is the right shape for this tool.

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

Completeness3/5

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

The existence of an output schema relieves the description of explaining return values, and the filename-optional rule covers the main complexity. Still missing are repo_type values and the write/overwrite semantics of local_dir, which matter for a tool that places files on the local machine.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate, and it only explains one of four parameters: filename and its empty-string default. repo_id, local_dir, and especially repo_type (default "model", with unstated allowed values such as dataset or space) receive no meaning beyond their bare names.

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

Purpose4/5

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

States a specific verb and resource ("Download ... from the Hub to the local machine") and disambiguates its own two modes: single file when a filename is given, whole repo when it is not. It does not name or distinguish itself from the sibling download_file, so an agent must still infer which of the two to pick.

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

Usage Guidelines3/5

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

Usage is implied by the conditional phrasing "with no filename, a whole repo," which tells the agent which parameter combination triggers which behavior. There is no explicit when-to-use versus alternatives (notably download_file) and no exclusions or prerequisites such as authentication for private or gated repos.

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