Hugging Face · Capability
Hugging Face Dataset Viewer API — Data Access
Hugging Face Dataset Viewer API — Data Access. 2 operations. Lead operation: Get First Rows of a Split. Self-contained Naftiko capability covering one Hugging Face business surface.
What You Can Do
GET
Getfirstrows
— Get First Rows of a Split
/v1/first-rows
GET
Getrows
— Get a Slice of Rows
/v1/rows
MCP Tools
get-first-rows-split
Get First Rows of a Split
read-only
idempotent
get-slice-rows
Get a Slice of Rows
read-only
idempotent
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: Hugging Face Dataset Viewer API — Data Access
description: 'Hugging Face Dataset Viewer API — Data Access. 2 operations. Lead operation: Get First Rows of a Split. Self-contained
Naftiko capability covering one Hugging Face business surface.'
tags:
- Hugging Face
- Data Access
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: dataset-viewer-data-access
baseUri: https://datasets-server.huggingface.co
description: Hugging Face Dataset Viewer API — Data Access business capability. Self-contained, no shared references.
resources:
- name: first-rows
path: /first-rows
operations:
- name: getfirstrows
method: GET
description: Get First Rows of a Split
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: dataset
in: query
type: string
description: The dataset ID
required: true
- name: config
in: query
type: string
description: The subset (configuration) name
required: true
- name: split
in: query
type: string
description: The split name
required: true
- name: rows
path: /rows
operations:
- name: getrows
method: GET
description: Get a Slice of Rows
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: dataset
in: query
type: string
description: The dataset ID
required: true
- name: config
in: query
type: string
description: The subset (configuration) name
required: true
- name: split
in: query
type: string
description: The split name
required: true
- name: offset
in: query
type: integer
description: Row offset to start from
- name: length
in: query
type: integer
description: Number of rows to return (max 100)
authentication:
type: bearer
token: '{{env.HUGGING_FACE_API_KEY}}'
exposes:
- type: rest
namespace: dataset-viewer-data-access-rest
port: 8080
description: REST adapter for Hugging Face Dataset Viewer API — Data Access. One Spectral-compliant resource per consumed
operation, prefixed with /v1.
resources:
- path: /v1/first-rows
name: first-rows
description: REST surface for first-rows.
operations:
- method: GET
name: getfirstrows
description: Get First Rows of a Split
call: dataset-viewer-data-access.getfirstrows
with:
dataset: rest.dataset
config: rest.config
split: rest.split
outputParameters:
- type: object
mapping: $.
- path: /v1/rows
name: rows
description: REST surface for rows.
operations:
- method: GET
name: getrows
description: Get a Slice of Rows
call: dataset-viewer-data-access.getrows
with:
dataset: rest.dataset
config: rest.config
split: rest.split
offset: rest.offset
length: rest.length
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: dataset-viewer-data-access-mcp
port: 9090
transport: http
description: MCP adapter for Hugging Face Dataset Viewer API — Data Access. One tool per consumed operation, routed inline
through this capability's consumes block.
tools:
- name: get-first-rows-split
description: Get First Rows of a Split
hints:
readOnly: true
destructive: false
idempotent: true
call: dataset-viewer-data-access.getfirstrows
with:
dataset: tools.dataset
config: tools.config
split: tools.split
outputParameters:
- type: object
mapping: $.
- name: get-slice-rows
description: Get a Slice of Rows
hints:
readOnly: true
destructive: false
idempotent: true
call: dataset-viewer-data-access.getrows
with:
dataset: tools.dataset
config: tools.config
split: tools.split
offset: tools.offset
length: tools.length
outputParameters:
- type: object
mapping: $.