Skip to main content
Glama
mlstudios-ai

MCP Mix Server

by mlstudios-ai

summarize_parquet_file

Analyze Parquet file dimensions by summarizing the count of rows and columns. Quickly assess file structure for efficient data processing on the MCP Mix Server.

Instructions

Summarise a Parquet file by reporting its number of rows and columns.

Args: filename (str): Name of the Parquet file in the /data directory.

Returns: str: A string describing the file's dimensions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main tool handler function for 'summarize_parquet_file'. Decorated with @mcp.tool() for automatic registration upon module import. Delegates the logic to the read_parquet_summary helper.
    @mcp.tool()
    def summarize_parquet_file(filename: str) -> str:
        """
        Summarise a Parquet file by reporting its number of rows and columns.
    
        Args:
            filename (str): Name of the Parquet file in the /data directory.
    
        Returns:
            str: A string describing the file's dimensions.
        """
        
        return read_parquet_summary(filename)
  • mcp_server/main.py:3-6 (registration)
    Imports the parquet_tools module (and csv_tools), which triggers registration of the decorated tool functions before starting the MCP server with mcp.run().
    # import and register tools decorated in tools.py
    # before running mcp.run()
    import tools.csv_tools
    import tools.parquet_tools
  • Supporting utility function that loads the Parquet file using pandas.read_parquet and computes the summary of rows and columns. Handles missing file gracefully.
    def read_parquet_summary(filename: str) -> str:
        """
        Read a Parquet file and return a simple summary.
    
        Args:
            filename (str): Name of the Parquet file
    
        Returns:
            str: A string describing the file's contents.
        """
        file_path = DATA_DIR / filename
        if not file_path.exists():
            return f"File {filename} does not exist."
    
        df = pd.read_parquet(file_path)
        
        return f"Parquet file '{filename}' has {len(df)} rows and {len(df.columns)} columns."
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the tool's behavior by stating it reports dimensions (rows/columns) and returns a string, but lacks details on error handling (e.g., if file doesn't exist), performance, or any side effects. It adds basic context but misses deeper behavioral traits.

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 front-loaded with the core purpose in the first sentence, followed by structured Args and Returns sections. Every sentence earns its place by providing essential information without redundancy, making it efficient and well-organized.

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

Completeness4/5

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

Given the tool's low complexity (1 parameter, no nested objects) and the presence of an output schema (which covers return values), the description is mostly complete. It explains what the tool does, the parameter's semantics, and the return type, but could improve by addressing error cases or usage vs. siblings.

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

Parameters4/5

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

The schema description coverage is 0%, so the description must compensate. It adds meaning by specifying that 'filename' is the name of a Parquet file in the '/data directory', which clarifies the parameter's context beyond the schema's generic 'Filename' title. However, it doesn't detail format constraints (e.g., file extensions).

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

Purpose5/5

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

The description clearly states the specific action ('Summarise a Parquet file') and what it reports ('number of rows and columns'), distinguishing it from the sibling tool 'summarize_csv_file' which presumably handles CSV files. The verb+resource+scope combination is precise and unambiguous.

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?

The description implies usage through the mention of 'Parquet file' and '/data directory', suggesting it's for Parquet files in that location, but doesn't explicitly state when to use this vs. the sibling CSV tool or any alternatives. No explicit exclusions or prerequisites are provided.

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

Related 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/mlstudios-ai/mcp-mix-server'

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