List Model Files
list_model_filesHugging Face Hub API, list the files in a model repository at a given revision (branch, tag or commit; main by default) and optional subdirectory path. Returns each entry's path, type, byte size and blob SHA, including LFS details for weight shards. Answers which weight, config and tokenizer files ship in a Hugging Face model repo and how large they are.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"repo_id": "bert-base-uncased"
},
"name": "list_model_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Subdirectory (default root) | |
| repo_id | Yes | ||
| revision | No | Branch/commit/tag (default main) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||