list_splits
Retrieve all available configurations and splits for a Hugging Face dataset to understand its structure and data organization.
Instructions
Get all available configurations and splits for a dataset
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dataset | Yes | Dataset ID (e.g., 'stanfordnlp/imdb') |
Implementation Reference
- src/tools/list-splits.ts:15-37 (handler)Registration and handler implementation for the list_splits tool.
export function registerListSplits(server: McpServer) { server.tool( "list_splits", "Get all available configurations and splits for a dataset", { dataset: z.string().describe("Dataset ID (e.g., 'stanfordnlp/imdb')"), }, async ({ dataset }) => { const data = await fetchDatasetViewer<SplitsResponse>("/splits", { dataset, }); return { content: [ { type: "text" as const, text: JSON.stringify(data.splits, null, 2), }, ], }; } ); } - src/tools/list-splits.ts:5-13 (schema)Interface defining the expected response structure for splits.
interface SplitsResponse { splits: Array<{ dataset: string; config: string; split: string; }>; pending: unknown[]; failed: unknown[]; }