Skip to main content
Glama
cfahlgren1

HF Dataset MCP

by cfahlgren1

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
NameRequiredDescriptionDefault
datasetYesDataset ID (e.g., 'stanfordnlp/imdb')

Implementation Reference

  • 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),
              },
            ],
          };
        }
      );
    }
  • Interface defining the expected response structure for splits.
    interface SplitsResponse {
      splits: Array<{
        dataset: string;
        config: string;
        split: string;
      }>;
      pending: unknown[];
      failed: unknown[];
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only implies a read-only operation via 'Get' but fails to disclose idempotency, return format, whether the operation is expensive, or what 'configurations' specifically refers to in this context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The single sentence is front-loaded with the verb 'Get' and contains no redundant or wasted words. However, it is so terse that it sacrifices helpful context that could have been added in a second sentence without harming conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple single-parameter tool with complete schema coverage, the description is minimally viable. However, given the rich sibling ecosystem (filter_rows, get_rows, etc.), it should mention that this is typically used before fetching data to discover available splits, or describe the return structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage (the 'dataset' parameter is fully documented in the schema with an example), the baseline is 3. The description adds no additional parameter context, constraints, or usage notes beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific resource terms 'configurations and splits' which clearly identifies this as a dataset metadata discovery tool for ML splits (train/test/val). While it doesn't explicitly name sibling alternatives, the specificity of 'configurations and splits' distinguishes it from generic 'dataset info' or 'statistics' tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states what the tool returns but provides no guidance on when to use it versus siblings like 'get_dataset_info' or prerequisites such as requiring a valid dataset ID first. No alternatives or exclusion criteria are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cfahlgren1/hf-dataset-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server