Skip to main content
Glama
shibuiwilliam

MCP Data Wrangler

data_estimated_size

Calculate the estimated size of an input data file in specified units (b, kb, mb, gb, tb) using this tool for efficient data management and preprocessing.

Instructions

Estimated size of the input data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
input_data_file_pathNoPath to the input data file
unitNoUnit for the estimated sizeb

Implementation Reference

  • The main handler function that executes the tool: parses input arguments, loads the dataframe, computes the estimated size in specified unit, formats result as JSON, and returns as TextContent.
    async def handle_data_estimated_size(
        arguments: dict[str, Any],
    ) -> list[types.TextContent | types.ImageContent | types.EmbeddedResource]:
        data_estimated_size_input = DataEstimatedSizeInputSchema.from_args(arguments)
        estimated_size = data_estimated_size_input.df.estimated_size(unit=data_estimated_size_input.unit)
    
        result_dict = {
            "description": "Estimated size of the input data",
            "size": estimated_size,
            "unit": data_estimated_size_input.unit,
        }
    
        return [
            types.TextContent(
                type="text",
                text=json.dumps(result_dict),
            )
        ]
  • Pydantic model defining input schema, including static methods for MCP inputSchema, from_schema (loads Data from file), and from_args (parses tool arguments).
    class DataEstimatedSizeInputSchema(Data):
        model_config = ConfigDict(
            validate_assignment=True,
            frozen=True,
            extra="forbid",
            arbitrary_types_allowed=True,
        )
    
        unit: str = Field(
            default="b",
            description="Unit for the estimated size. One of: 'b' (bytes), 'kb', 'mb', 'gb', 'tb'",
        )
    
        @staticmethod
        def input_schema() -> dict:
            return {
                "type": "object",
                "properties": {
                    "input_data_file_path": {
                        "type": "string",
                        "description": "Path to the input data file",
                    },
                    "unit": {
                        "type": "string",
                        "enum": ["b", "kb", "mb", "gb", "tb"],
                        "description": "Unit for the estimated size",
                        "default": "b",
                    },
                },
            }
    
        @staticmethod
        def from_schema(
            input_data_file_path: str,
            unit: str = "b",
        ) -> "DataEstimatedSizeInputSchema":
            data = Data.from_file(input_data_file_path)
            return DataEstimatedSizeInputSchema(
                df=data.df,
                unit=unit,
            )
    
        @staticmethod
        def from_args(arguments: dict[str, Any]) -> "DataEstimatedSizeInputSchema":
            input_data_file_path = arguments["input_data_file_path"]
            unit = arguments.get("unit", "b")
            return DataEstimatedSizeInputSchema.from_schema(
                input_data_file_path=input_data_file_path,
                unit=unit,
            )
  • Registers the tool schema (name, description, inputSchema) in the MCPServerDataWrangler.tools() method which returns the list of all tools.
    types.Tool(
        name=MCPServerDataWrangler.data_estimated_size.value[0],
        description=MCPServerDataWrangler.data_estimated_size.value[1],
        inputSchema=DataEstimatedSizeInputSchema.input_schema(),
    ),
  • Maps the tool name to its handler function in the tool_to_handler() dictionary used for dispatching.
    MCPServerDataWrangler.data_estimated_size.value[0]: handle_data_estimated_size,
  • Enum member in MCPServerDataWrangler defining the canonical tool name and description.
    data_estimated_size = ("data_estimated_size", "Estimated size of the input data")
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool estimates size but doesn't reveal how it works (e.g., sampling vs. full scan), performance implications, accuracy, or output format. For a tool with zero annotation coverage, this leaves critical behavioral traits unspecified, though it doesn't contradict anything.

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 description is a single, efficient sentence that directly states the tool's purpose without fluff. It's appropriately sized for a simple tool, though it could be more front-loaded with key details. There's no waste, but it borders on under-specification rather than optimal conciseness.

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?

Given no annotations, no output schema, and a simple input schema, the description is incomplete. It doesn't explain what 'estimated' means (e.g., approximation method), what the output looks like, or any limitations. For a tool that performs estimation—a potentially nuanced operation—this lacks necessary context to guide effective use.

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 description coverage is 100%, with clear documentation for both parameters (input_data_file_path and unit with enum). The description adds no meaning beyond the schema—it doesn't explain parameter interactions or provide examples. Baseline 3 is appropriate since the schema does the heavy lifting, but the description doesn't compensate or enhance understanding.

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

Purpose3/5

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

The description 'Estimated size of the input data' states what the tool does (estimating size) but is vague about scope and method. It doesn't specify whether this estimates file size, memory footprint, or something else, nor does it distinguish from siblings like data_shape or data_schema that might provide related metadata. The purpose is understandable but lacks specificity.

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. With siblings like data_shape (which might include size info) and data_schema (for structure), there's no indication of when estimation is preferred over exact measurements or other metadata tools. Usage is implied only by the tool name, with no explicit context or exclusions.

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/shibuiwilliam/mcp-server-data-wrangler'

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