Skip to main content
Glama

hf_upload

Upload a local file or folder to a Hugging Face Hub repo, creating the repository if missing and defaulting to private.

Instructions

Upload a local file or folder to a Hub repo (created if missing, private by default).

repo_id: "/". repo_type: "model", "dataset" or "space".

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": {
      "local_path": "<local_path>",
      "repo_id": "<repo_id>"
    },
    "name": "hf_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
privateNo
repo_idYes
repo_typeNomodel
local_pathYes
path_in_repoNo

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; it does disclose that the target repo is auto-created and that the default visibility is private, which are the most consequential behaviors for a write tool. It omits authentication/token requirements, what happens when a file already exists at the destination (overwrite vs error), and whether folder upload is recursive.

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?

Very short and front-loaded with the core action, with no filler sentences. The terse field-note formatting ('repo_id: ...', 'repo_type: ...') is efficient but reads as fragmentary rather than structured prose.

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?

An output schema exists, so return values need not be explained here. However, for a five-parameter mutation tool with zero annotation coverage and zero schema descriptions, missing auth requirements, overwrite semantics, and path_in_repo meaning leave real gaps an agent would need filled.

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 0%, so the description must compensate. It does explain repo_id's '<user>/<name>' format and enumerates repo_type values ('model', 'dataset', 'space'), but leaves local_path and path_in_repo — the latter critical for controlling where the file lands in the repo — entirely undefined.

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?

Names a specific verb and resource (upload a local file or folder to a Hub repo) and adds two concrete scope facts: the repo is created if missing and is private by default. It does not differentiate itself from the sibling 'upload_file', which an agent would reasonably consider an alternative for the same action.

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

Usage Guidelines2/5

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

There is no statement of when to use this versus 'upload_file' or 'hf_push_run', and no prerequisites or exclusions are given. The only guidance-adjacent information is the default behavior (creates the repo, private by default), which is really behavioral disclosure rather than selection criteria.

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