Hugging Face · Capability

Hugging Face Hub API — Repos

Hugging Face Hub API — Repos. 3 operations. Lead operation: Create a New Repository. Self-contained Naftiko capability covering one Hugging Face business surface.

Run with Naftiko Hugging FaceRepos

What You Can Do

POST
Createrepo — Create a New Repository
/v1/repos/create
DELETE
Deleterepo — Delete a Repository
/v1/repos/delete
PUT
Updatereposettings — Update Repository Settings
/v1/repos/{repo-type}/{repo-id}/settings

MCP Tools

create-new-repository

Create a New Repository

delete-repository

Delete a Repository

idempotent
update-repository-settings

Update Repository Settings

idempotent

Capability Spec

hub-repos.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Hugging Face Hub API — Repos
  description: 'Hugging Face Hub API — Repos. 3 operations. Lead operation: Create a New Repository. Self-contained Naftiko
    capability covering one Hugging Face business surface.'
  tags:
  - Hugging Face
  - Repos
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    HUGGING_FACE_API_KEY: HUGGING_FACE_API_KEY
capability:
  consumes:
  - type: http
    namespace: hub-repos
    baseUri: https://huggingface.co/api
    description: Hugging Face Hub API — Repos business capability. Self-contained, no shared references.
    resources:
    - name: repos-create
      path: /repos/create
      operations:
      - name: createrepo
        method: POST
        description: Create a New Repository
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: repos-delete
      path: /repos/delete
      operations:
      - name: deleterepo
        method: DELETE
        description: Delete a Repository
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: repos-repo_type-repo_id-settings
      path: /repos/{repo_type}/{repo_id}/settings
      operations:
      - name: updatereposettings
        method: PUT
        description: Update Repository Settings
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: repo_type
          in: path
          type: string
          required: true
        - name: repo_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.HUGGING_FACE_API_KEY}}'
  exposes:
  - type: rest
    namespace: hub-repos-rest
    port: 8080
    description: REST adapter for Hugging Face Hub API — Repos. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/repos/create
      name: repos-create
      description: REST surface for repos-create.
      operations:
      - method: POST
        name: createrepo
        description: Create a New Repository
        call: hub-repos.createrepo
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/delete
      name: repos-delete
      description: REST surface for repos-delete.
      operations:
      - method: DELETE
        name: deleterepo
        description: Delete a Repository
        call: hub-repos.deleterepo
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{repo-type}/{repo-id}/settings
      name: repos-repo-type-repo-id-settings
      description: REST surface for repos-repo_type-repo_id-settings.
      operations:
      - method: PUT
        name: updatereposettings
        description: Update Repository Settings
        call: hub-repos.updatereposettings
        with:
          repo_type: rest.repo_type
          repo_id: rest.repo_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: hub-repos-mcp
    port: 9090
    transport: http
    description: MCP adapter for Hugging Face Hub API — Repos. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: create-new-repository
      description: Create a New Repository
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: hub-repos.createrepo
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-repository
      description: Delete a Repository
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: hub-repos.deleterepo
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: update-repository-settings
      description: Update Repository Settings
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: hub-repos.updatereposettings
      with:
        repo_type: tools.repo_type
        repo_id: tools.repo_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.