Skip to main content
Glama
cfahlgren1

HF Dataset MCP

by cfahlgren1

list_parquet_files

Retrieve direct download URLs for Parquet files from Hugging Face datasets to enable data processing and analysis.

Instructions

Get URLs for the dataset's Parquet files for direct download or processing

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
datasetYesDataset ID (e.g., 'stanfordnlp/imdb')

Implementation Reference

  • The handler function that executes the logic for listing parquet files for a given dataset.
      async ({ dataset }) => {
        const data = await fetchDatasetViewer<ParquetResponse>("/parquet", {
          dataset,
        });
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(data.parquet_files, null, 2),
            },
          ],
        };
      }
    );
  • Registration function that defines the "list_parquet_files" tool and its parameters.
    export function registerListParquetFiles(server: McpServer) {
      server.tool(
        "list_parquet_files",
        "Get URLs for the dataset's Parquet files for direct download or processing",
        {
          dataset: z.string().describe("Dataset ID (e.g., 'stanfordnlp/imdb')"),
        },
        async ({ dataset }) => {
          const data = await fetchDatasetViewer<ParquetResponse>("/parquet", {
            dataset,
          });
    
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(data.parquet_files, null, 2),
              },
            ],
          };
        }
      );
    }
  • Type definition for the response structure returned by the parquet file API.
    interface ParquetResponse {
      parquet_files: Array<{
        dataset: string;
        config: string;
        split: string;
        url: string;
        filename: string;
        size: number;
      }>;
      pending: unknown[];
      failed: unknown[];
      partial: boolean;
    }
Behavior3/5

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

With no annotations provided, the description carries full behavioral disclosure burden. It states the return type (URLs) and format (Parquet), but omits critical operational details like URL expiration, pagination limits, or response structure (array vs object).

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

Conciseness5/5

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

Single, efficient sentence with action-frontloaded structure ('Get URLs...'). No redundant phrases; every clause serves to specify the operation, target resource, or intended use case.

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?

Adequate for a single-parameter tool with complete schema coverage, but lacks output structure details (since no output schema exists) and doesn't clarify how results map to dataset splits or file organization.

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?

Schema has 100% description coverage for the single 'dataset' parameter, which is well-documented with an example. The description does not add semantic depth beyond the schema, but meets the baseline expectation given the high schema coverage.

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?

States specific action ('Get') and resource ('URLs for the dataset's Parquet files'), clearly distinguishing from sibling data-access tools like 'get_rows' or 'search_dataset' by specifying file-based download URLs rather than queried data.

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

Usage Guidelines3/5

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

Implies usage context ('for direct download or processing') suggesting when to use it over data-querying tools, but lacks explicit 'when not to use' guidance or direct comparisons to siblings like 'get_rows'.

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