validate_dataset
Verify dataset accessibility and identify available viewer features for Hugging Face datasets to ensure compatibility and functionality.
Instructions
Check if a dataset is accessible and which viewer features are available
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dataset | Yes | Dataset ID (e.g., 'stanfordnlp/imdb') |
Implementation Reference
- src/tools/validate-dataset.ts:20-33 (handler)The handler function for the validate_dataset tool which calls the internal fetchDatasetViewer to validate a dataset.
async ({ dataset }) => { const data = await fetchDatasetViewer<ValidResponse>("/is-valid", { dataset, }); return { content: [ { type: "text" as const, text: JSON.stringify(data, null, 2), }, ], }; } - src/tools/validate-dataset.ts:17-19 (schema)Input schema for the validate_dataset tool using zod.
{ dataset: z.string().describe("Dataset ID (e.g., 'stanfordnlp/imdb')"), }, - src/tools/validate-dataset.ts:14-34 (registration)Registration of the validate_dataset tool within the MCP server.
server.tool( "validate_dataset", "Check if a dataset is accessible and which viewer features are available", { dataset: z.string().describe("Dataset ID (e.g., 'stanfordnlp/imdb')"), }, async ({ dataset }) => { const data = await fetchDatasetViewer<ValidResponse>("/is-valid", { dataset, }); return { content: [ { type: "text" as const, text: JSON.stringify(data, null, 2), }, ], }; } );