Skip to main content
Glama
privetin

Dataset Viewer MCP Server

by privetin

get_parquet

Export Hugging Face dataset splits as Parquet files for data analysis and processing workflows.

Instructions

Export Hugging Face dataset split as Parquet file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
datasetYesHugging Face dataset identifier in the format owner/dataset
auth_tokenNoHugging Face auth token for private/gated datasets

Implementation Reference

  • Executes the get_parquet tool: fetches parquet data from HF Dataset Viewer API using DatasetViewerAPI and saves it to a local .parquet file, returning the file path.
    elif name == "get_parquet":
        dataset = arguments["dataset"]
        parquet_data = await DatasetViewerAPI(auth_token=auth_token).get_parquet(dataset)
        
        # Save to a temporary file with .parquet extension
        filename = f"{dataset.replace('/', '_')}.parquet"
        filepath = os.path.join(os.getcwd(), filename)
        with open(filepath, "wb") as f:
            f.write(parquet_data)
            
        return [
            types.TextContent(
                type="text",
                text=f"Dataset exported to: {filepath}"
            )
        ]
  • Registers the get_parquet tool in the MCP server's list_tools() handler, defining its name, description, and input schema.
    types.Tool(
        name="get_parquet",
        description="Export Hugging Face dataset split as Parquet file",
        inputSchema={
            "type": "object",
            "properties": {
                "dataset": {
                    "type": "string",
                    "description": "Hugging Face dataset identifier in the format owner/dataset",
                    "pattern": "^[^/]+/[^/]+$",
                    "examples": ["ylecun/mnist", "stanfordnlp/imdb"]
                },
                "auth_token": {
                    "type": "string",
                    "description": "Hugging Face auth token for private/gated datasets",
                    "optional": True
                }
            },
            "required": ["dataset"],
        }
    ),
  • DatasetViewerAPI helper method that performs the HTTP request to retrieve the full dataset as parquet bytes from the HF datasets-server.
    async def get_parquet(self, dataset: str) -> bytes:
        """Get entire dataset in Parquet format"""
        response = await self.client.get("/parquet", params={"dataset": dataset})
        response.raise_for_status()
        return response.content
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is an export operation but doesn't clarify whether this creates a file download, returns data in memory, requires specific permissions, has rate limits, or what happens with large datasets. The mention of 'auth_token' in the schema hints at authentication needs, but the description doesn't elaborate on this behavioral aspect.

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?

The description is a single, efficient sentence that communicates the core functionality without any wasted words. It's appropriately sized and front-loaded with the essential information.

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

Completeness2/5

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

For a data export tool with no annotations and no output schema, the description is insufficient. It doesn't explain what format the exported data returns in, whether it's a file or structured data, how large datasets are handled, or what authentication scenarios require the optional auth_token. Given the complexity of data export operations, more context is needed.

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 schema already fully documents both parameters. The description doesn't add any additional meaning about the parameters beyond what's in the schema, so it meets the baseline for high schema coverage without providing extra value.

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 clearly states the action ('Export') and resource ('Hugging Face dataset split as Parquet file'), making the tool's purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get_rows' or 'get_first_rows' that might also retrieve dataset content, so it doesn't reach the highest score.

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 provides no guidance on when to use this tool versus alternatives like 'get_rows' or 'filter'. It mentions exporting as Parquet, but doesn't explain why one would choose this format over other retrieval methods available in the sibling tools.

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/privetin/dataset-viewer'

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