{"openapi":"3.1.0","info":{"title":"Hugging Face repository files, commits, branches and discussions (your token) API","version":"0.1.0","description":"Hugging Face repository files, commits, branches and discussions (your token) lets an AI assistant read your own Hugging Face Repo History data through the Hugging Face Repo History API with a key you supply (Hugging Face access token). Read-only: 6 tools (list_repo_tree, list_repo_commits, list_repo_refs, list_repo_discussions, get_repo_discussion, list_repo_lfs_files). The BYOK key travels with...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-huggingface-repo-history.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-huggingface-repo-history/docs"},"termsOfService":"https://connectorbay.com/byok-huggingface-repo-history/terms"},"servers":[{"url":"https://byok-huggingface-repo-history.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-huggingface-repo-history/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_repo_tree":{"post":{"operationId":"list_repo_tree","summary":"List the files and folders of a repository at a revision with type, path, size in bytes, git object id and LFS size. Ret","description":"List the files and folders of a repository at a revision with type, path, size in bytes, git object id and LFS size. Returns the first page of entries. Reads repository metadata only; file contents are not downloaded. Use for \"What files are in the Hugging Face model openai-community/gpt2 and how big are they\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"repo_type":{"description":"Kind of repository: models, datasets or spaces.","enum":["models","datasets","spaces"],"title":"Repo Type","type":"string"},"namespace":{"description":"Owner of the repository (user or organization), for example 'openai-community'.","maxLength":100,"title":"Namespace","type":"string"},"repo":{"description":"Repository name without the owner, for example 'gpt2'.","maxLength":100,"title":"Repo","type":"string"},"revision":{"description":"Branch, tag or commit hash, for example 'main'.","maxLength":100,"title":"Revision","type":"string"},"recursive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to list files in subfolders as well.","title":"Recursive"}},"required":["repo_type","namespace","repo","revision"],"title":"list_repo_treeArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_repo_commits":{"post":{"operationId":"list_repo_commits","summary":"List the commits of a repository at a revision, newest first, with commit id, title, message, date and authors. Reads re","description":"List the commits of a repository at a revision, newest first, with commit id, title, message, date and authors. Reads repository metadata only; file contents are not downloaded. Use for \"What are the latest commits of Hugging Face model openai-community/gpt2\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"repo_type":{"description":"Kind of repository: models, datasets or spaces.","enum":["models","datasets","spaces"],"title":"Repo Type","type":"string"},"namespace":{"description":"Owner of the repository (user or organization), for example 'openai-community'.","maxLength":100,"title":"Namespace","type":"string"},"repo":{"description":"Repository name without the owner, for example 'gpt2'.","maxLength":100,"title":"Repo","type":"string"},"revision":{"description":"Branch, tag or commit hash, for example 'main'.","maxLength":100,"title":"Revision","type":"string"}},"required":["repo_type","namespace","repo","revision"],"title":"list_repo_commitsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_repo_refs":{"post":{"operationId":"list_repo_refs","summary":"List the branches, tags and conversion refs of a repository with their names, ref paths and target commit ids. Reads rep","description":"List the branches, tags and conversion refs of a repository with their names, ref paths and target commit ids. Reads repository metadata only; file contents are not downloaded. Use for \"Which branches and tags does Hugging Face model openai-community/gpt2 have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"repo_type":{"description":"Kind of repository: models, datasets or spaces.","enum":["models","datasets","spaces"],"title":"Repo Type","type":"string"},"namespace":{"description":"Owner of the repository (user or organization), for example 'openai-community'.","maxLength":100,"title":"Namespace","type":"string"},"repo":{"description":"Repository name without the owner, for example 'gpt2'.","maxLength":100,"title":"Repo","type":"string"}},"required":["repo_type","namespace","repo"],"title":"list_repo_refsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_repo_discussions":{"post":{"operationId":"list_repo_discussions","summary":"List discussions and pull requests of a repository with number, title, status, pull request flag, author and creation ti","description":"List discussions and pull requests of a repository with number, title, status, pull request flag, author and creation time; 'count' is the total. Page index starts at 0. Reads repository metadata only; file contents are not downloaded. Use for \"What open pull requests does Hugging Face model openai-community/gpt2 have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"repo_type":{"description":"Kind of repository: models, datasets or spaces.","enum":["models","datasets","spaces"],"title":"Repo Type","type":"string"},"namespace":{"description":"Owner of the repository (user or organization), for example 'openai-community'.","maxLength":100,"title":"Namespace","type":"string"},"repo":{"description":"Repository name without the owner, for example 'gpt2'.","maxLength":100,"title":"Repo","type":"string"},"discussion_type":{"anyOf":[{"enum":["all","discussion","pull_request"],"type":"string"},{"type":"null"}],"default":null,"description":"Only this kind: all, discussion or pull_request.","title":"Discussion Type"},"status":{"anyOf":[{"enum":["all","open","closed"],"type":"string"},{"type":"null"}],"default":null,"description":"Only this status: all, open or closed.","title":"Status"},"author":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only discussions started by this username.","title":"Author"},"page":{"anyOf":[{"maximum":10000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Page index starting at 0.","title":"Page"}},"required":["repo_type","namespace","repo"],"title":"list_repo_discussionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_repo_discussion":{"post":{"operationId":"get_repo_discussion","summary":"Get one discussion or pull request by number: title, status, pull request flag, author, target branch, merge commit and ","description":"Get one discussion or pull request by number: title, status, pull request flag, author, target branch, merge commit and conflicting files. Comment text is not returned. Reads repository metadata only; file contents are not downloaded. Use for \"Is pull request 7 on Hugging Face model openai-community/gpt2 mergeable\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"repo_type":{"description":"Kind of repository: models, datasets or spaces.","enum":["models","datasets","spaces"],"title":"Repo Type","type":"string"},"namespace":{"description":"Owner of the repository (user or organization), for example 'openai-community'.","maxLength":100,"title":"Namespace","type":"string"},"repo":{"description":"Repository name without the owner, for example 'gpt2'.","maxLength":100,"title":"Repo","type":"string"},"discussion_num":{"description":"Discussion or pull request number, for example 7.","minimum":1,"title":"Discussion Num","type":"integer"}},"required":["repo_type","namespace","repo","discussion_num"],"title":"get_repo_discussionArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_repo_lfs_files":{"post":{"operationId":"list_repo_lfs_files","summary":"List the large (LFS) files stored for a repository with object id, filename, size, push time and ref; useful for storage","description":"List the large (LFS) files stored for a repository with object id, filename, size, push time and ref; useful for storage usage. Reads repository metadata only; file contents are not downloaded. Use for \"How much LFS storage does my Hugging Face repo alice/my-model use\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"repo_type":{"description":"Kind of repository: models, datasets or spaces.","enum":["models","datasets","spaces"],"title":"Repo Type","type":"string"},"namespace":{"description":"Owner of the repository (user or organization), for example 'openai-community'.","maxLength":100,"title":"Namespace","type":"string"},"repo":{"description":"Repository name without the owner, for example 'gpt2'.","maxLength":100,"title":"Repo","type":"string"}},"required":["repo_type","namespace","repo"],"title":"list_repo_lfs_filesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}