Skip to main content
Glama
HeetVekariya

Linear Regression MCP

by HeetVekariya

check_category_columns

Identify categorical columns in your dataset to prepare data for linear regression analysis.

Instructions

This function check if data has categorical columns.

Returns: String which contains list of categorical columns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • server.py:82-97 (handler)
    The handler function for the 'check_category_columns' tool. It is decorated with @mcp.tool() to register it as an MCP tool. The function retrieves the data from the global context, selects categorical columns (object or category types), and returns a message listing them or indicating none exist.
    @mcp.tool()
    def check_category_columns() -> str:
        """
        This function check if data has categorical columns.
    
        Returns:
            String which contains list of categorical columns.
        """
    
        categorical_data = context.get_data().select_dtypes(include=["object", "category"])
    
        if not categorical_data.empty:
            return f"Data has following categorical columns: {", ".join(categorical_data.columns.to_list())}"
        else:
            return f"Data has no categorical columns."
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions the return type ('String which contains list of categorical columns') but lacks behavioral details: it doesn't specify what happens if no categorical columns exist, how it determines 'categorical' (e.g., based on data types or thresholds), whether it's read-only or has side effects, or error conditions. The description adds minimal value beyond the basic operation.

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

Conciseness3/5

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

The description is brief (two sentences) but could be more front-loaded; the first sentence states the purpose, and the second clarifies the return. However, it's somewhat under-specified (e.g., 'data' is ambiguous) and lacks efficiency in explaining context. It avoids waste but doesn't fully earn its place with rich 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?

Given the complexity (a data analysis tool with siblings), no annotations, and no output schema, the description is incomplete. It doesn't explain how the tool interacts with data (e.g., is data pre-loaded?), what format the return string is in, or error handling. For a tool in a suite with siblings like 'upload_file', more context is needed to understand its role and limitations.

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 tool has 0 parameters, and schema description coverage is 100% (though empty). The description doesn't need to compensate for missing parameter info. It appropriately doesn't discuss parameters, so it meets the baseline of 4 for zero-parameter tools by not introducing confusion.

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 states the tool's purpose ('check if data has categorical columns') which is clear but vague about what 'data' refers to. It doesn't differentiate from siblings like 'get_columns_info' or 'label_encode_categorical_columns' which also work with columns. The description provides a basic verb+resource but lacks specificity about scope or context.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., needing data loaded first), exclusions, or comparisons to sibling tools like 'get_columns_info' (which might provide broader column metadata) or 'label_encode_categorical_columns' (which processes categorical columns). Usage context is implied but not explicit.

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/HeetVekariya/Linear-Regression-MCP'

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