Skip to main content
Glama

Hugging Face Hub: Find, use and view models, datasets, spaces, buckets, papers, documentation and collections. Get daily papers reports, and browse trending content.

hf_fs
Read-only

When to use: Hugging Face Hub models, datasets, Spaces, collections, papers, daily papers, today's trending models, current paper leaderboard, docs, and repository files.

Examples: {"operations":[{"cmd":"ls","args":["hf://models/trending","--limit","10"]}]} {"operations":[{"cmd":"ls","args":["hf://papers/trending"]}]} {"operations":[{"cmd":"ls","args":["hf://papers/daily/latest"]}]}

Use hf_fs for Hugging Face Hub filesystem operations. Call it with operations, an array of {cmd, args} items; multiple operations may be submitted together.

Usage: {"operations":[{"cmd":"ls","args":["hf://models/org/repo"]}]}

Grammar; each string below is one args array item: ls URI [--recursive] [--glob GLOB] [--type TYPE] [--sort SORT] [--limit N] cat URI [--offset N] [--max-bytes N] attach URI [--max-bytes N] stat URI find URI [--name GLOB] [--path GLOB] [--type TYPE] [--limit N] search URI [QUERY] [--type TYPE] [--sort SORT] [--tag TAG] [--kind mcp] [--limit N]

COMMAND = ls|cat|attach|stat|find|search. TYPE = file|dir|repo|bucket|collection|paper|link. SORT = createdAt|downloads|likes|lastModified|likes30d|trendingScore|mainSize|id|trending|upvotes. URI is a canonical hf:// URI. QUERY and GLOB are each one string.

Use search for discovery, ls for a known directory, find for recursive matching within a known scope, stat for filesystem metadata or an uncertain target type, cat for text contents, and attach for a complete JPEG, PNG, or WebP image. When the request gives an exact text-file URI, use cat directly; do not add ls or stat first. stat does not read the contents of JSON, Markdown, or other text files.

Search scopes: hf://models|datasets|spaces[/OWNER], hf://collections[/OWNER], hf://papers, and hf://docs[/...]. Paper and documentation search require QUERY. Repeat --tag only for search hf://spaces; --kind mcp selects MCP Spaces. Use ls hf://models/trending, hf://datasets/trending, hf://spaces/trending, or hf://papers/trending for trending listings. For a named paper.md or metadata.json, use cat directly. Use ls on a paper only to discover an unnamed related resource. Omit --limit, --sort, and --type unless the request requires them. Limits and path-specific behavior are documented at hf://README.md. Issue one hf_fs call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultsYes
truncatedNo
truncation_reasonNo

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already carry readOnlyHint=true and destructiveHint=false, so the bar is lower, but the description adds substantial behavioral context: 'stat does not read the contents of JSON, Markdown, or other text files,' attach is for complete images only, --kind mcp selects MCP Spaces, up to 30 operations can be batched, and limits are routed to hf://README.md. No contradiction with annotations.

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?

The description is long, but the density is justified by six subcommands, arbitrary string arguments, scopes, and enums; the table-like grammar block and front-loaded 'When to use' section make it highly parseable. Minor redundancy: the Examples section and the separate Usage block both demonstrate ls calls, and the title overlaps the 'When to use' list.

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

Completeness5/5

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

For a high-complexity tool, the description covers command selection, search scopes, trending endpoints, paper-specific behavior, batching ('Issue one hf_fs call'), and flag minimization ('Omit --limit, --sort, and --type unless the request requires them'). Residual details are explicitly routed ('Limits and path-specific behavior are documented at hf://README.md'), and an output schema exists so return-value semantics need not be duplicated.

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

Parameters5/5

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

Schema description coverage is 0% (the top-level operations property has no description), so the description must carry the full burden and does: it defines the complete grammar for all six commands with flags, enumerates TYPE and SORT values, specifies 'each string below is one args array item,' declares 'URI is a canonical hf:// URI,' and gives concrete invocation examples.

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 resource and mechanism: 'Use hf_fs for Hugging Face Hub filesystem operations,' preceded by a concrete 'When to use' list covering models, datasets, Spaces, papers, docs, and trending content. The six-command grammar (ls/cat/attach/stat/find/search) over canonical hf:// URIs makes it clearly distinguishable from siblings like hub_repo_search and hf_whoami even without naming them.

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?

Provides explicit subcommand selection rules: 'Use search for discovery, ls for a known directory, find for recursive matching within a known scope, stat for filesystem metadata or an uncertain target type, cat for text contents, and attach for a complete JPEG, PNG, or WebP image.' It also gives when-not guidance ('do not add ls or stat first' for exact text-file URIs) and hard constraints like 'Paper and documentation search require QUERY.'

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.8/5.0
Disambiguation2/5

hf_fs is a multi-purpose tool with search, ls, stat, and cat subcommands that overlap significantly with hub_repo_search and hub_repo_details. An agent could easily select the wrong tool for searching repos or retrieving details, as both hf_fs and hub_repo_search expose search capabilities and both hf_fs's stat and hub_repo_details provide metadata.

Naming Consistency2/5

The tool names use inconsistent prefixes: 'hf_fs' and 'hf_whoami' versus 'hub_repo_details' and 'hub_repo_search'. This creates two naming conventions (hf_ vs hub_repo_), and hf_fs does not follow the descriptive pattern of the other tools.

Tool Count3/5

With only 4 tools, the count is not excessive, but hf_fs is overloaded with many subcommands while the other tools are narrowly scoped. This makes the tool distribution uneven, though the total number is within a reasonable range.

Completeness3/5

The set covers read-only operations well: searching, listing, reading files, retrieving repo details, and checking auth. However, there are no write operations (create, update, delete) for repositories or files, and dataset preview is only available through hub_repo_details, which might be a gap for dataset-focused workflows.

Resources