naftiko: 1.0.0-alpha2 info: label: Hugging Face Hub API — Models description: 'Hugging Face Hub API — Models. 5 operations. Lead operation: List Available Metrics. Self-contained Naftiko capability covering one Hugging Face business surface.' tags: - Hugging Face - Models 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-models baseUri: https://huggingface.co/api description: Hugging Face Hub API — Models business capability. Self-contained, no shared references. resources: - name: metrics path: /metrics operations: - name: listmetrics method: GET description: List Available Metrics outputRawFormat: json outputParameters: - name: result type: object value: $. - name: models path: /models operations: - name: listmodels method: GET description: List Models on the Hub outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: search in: query type: string description: Full-text search query to filter models - name: author in: query type: string description: Filter by model author or organization - name: filter in: query type: string description: Filter by tags (comma-separated) - name: sort in: query type: string description: Property to sort results by - name: direction in: query type: string description: Sort direction - name: limit in: query type: integer description: Number of results to return (max 1000) - name: full in: query type: boolean description: Whether to return full model information including card data - name: config in: query type: boolean description: Whether to return the model config - name: pipeline_tag in: query type: string description: Filter by pipeline task type - name: library in: query type: string description: Filter by ML library - name: models-tags-by-type path: /models-tags-by-type operations: - name: listmodeltags method: GET description: List Model Tags Grouped by Type outputRawFormat: json outputParameters: - name: result type: object value: $. - name: models-repo_id path: /models/{repo_id} operations: - name: getmodel method: GET description: Get Model Information outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: repo_id in: path type: string description: The model repository ID (e.g., bert-base-uncased or organization/model-name) required: true - name: models-repo_id-revision-revision path: /models/{repo_id}/revision/{revision} operations: - name: getmodelrevision method: GET description: Get Model Information at a Specific Revision outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: repo_id in: path type: string required: true - name: revision in: path type: string description: Git revision (branch name, tag, or commit SHA) required: true authentication: type: bearer token: '{{env.HUGGING_FACE_API_KEY}}' exposes: - type: rest namespace: hub-models-rest port: 8080 description: REST adapter for Hugging Face Hub API — Models. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/metrics name: metrics description: REST surface for metrics. operations: - method: GET name: listmetrics description: List Available Metrics call: hub-models.listmetrics outputParameters: - type: object mapping: $. - path: /v1/models name: models description: REST surface for models. operations: - method: GET name: listmodels description: List Models on the Hub call: hub-models.listmodels with: search: rest.search author: rest.author filter: rest.filter sort: rest.sort direction: rest.direction limit: rest.limit full: rest.full config: rest.config pipeline_tag: rest.pipeline_tag library: rest.library outputParameters: - type: object mapping: $. - path: /v1/models-tags-by-type name: models-tags-by-type description: REST surface for models-tags-by-type. operations: - method: GET name: listmodeltags description: List Model Tags Grouped by Type call: hub-models.listmodeltags outputParameters: - type: object mapping: $. - path: /v1/models/{repo-id} name: models-repo-id description: REST surface for models-repo_id. operations: - method: GET name: getmodel description: Get Model Information call: hub-models.getmodel with: repo_id: rest.repo_id outputParameters: - type: object mapping: $. - path: /v1/models/{repo-id}/revision/{revision} name: models-repo-id-revision-revision description: REST surface for models-repo_id-revision-revision. operations: - method: GET name: getmodelrevision description: Get Model Information at a Specific Revision call: hub-models.getmodelrevision with: repo_id: rest.repo_id revision: rest.revision outputParameters: - type: object mapping: $. - type: mcp namespace: hub-models-mcp port: 9090 transport: http description: MCP adapter for Hugging Face Hub API — Models. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-available-metrics description: List Available Metrics hints: readOnly: true destructive: false idempotent: true call: hub-models.listmetrics outputParameters: - type: object mapping: $. - name: list-models-hub description: List Models on the Hub hints: readOnly: true destructive: false idempotent: true call: hub-models.listmodels with: search: tools.search author: tools.author filter: tools.filter sort: tools.sort direction: tools.direction limit: tools.limit full: tools.full config: tools.config pipeline_tag: tools.pipeline_tag library: tools.library outputParameters: - type: object mapping: $. - name: list-model-tags-grouped-type description: List Model Tags Grouped by Type hints: readOnly: true destructive: false idempotent: true call: hub-models.listmodeltags outputParameters: - type: object mapping: $. - name: get-model-information description: Get Model Information hints: readOnly: true destructive: false idempotent: true call: hub-models.getmodel with: repo_id: tools.repo_id outputParameters: - type: object mapping: $. - name: get-model-information-specific-revision description: Get Model Information at a Specific Revision hints: readOnly: true destructive: false idempotent: true call: hub-models.getmodelrevision with: repo_id: tools.repo_id revision: tools.revision outputParameters: - type: object mapping: $.