Skip to main content
Glama

Feature Selection

feature_selection

Remove unhelpful numerical features via variance, correlation, F-test, or mutual-information filtering before model training.

Instructions

Remove unhelpful numerical features. Only numerical feature columns are evaluated; other columns are kept. Scored methods need no missing values (run impute_missing first). Args: dataset_id (str): ID of a dataset or of a split. For a split the target is known already. target_column (str, optional): Target column. Required for a plain dataset when method is k_best or mutual_info; it is never removed. method (str): "k_best" (keep the k best by F-test), "mutual_info" (keep the k best by mutual information), "variance" (drop near-constant features) or "correlation" (drop one of each highly correlated pair). k (int): Number of features kept by k_best and mutual_info. Default is 10. threshold (float, optional): Minimum variance for "variance" (default 0.0) or maximum absolute correlation for "correlation" (default 0.9). Returns: dict: Selected and dropped columns, with scores where available.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "dataset_id": "<dataset_id>"
    },
    "name": "feature_selection"
  }
}

Input Schema

NameRequiredDescriptionDefault
kNo
methodNok_best
thresholdNo
dataset_idYes
target_columnNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden: it discloses that non-numerical columns are untouched, that the target is never removed, the missing-value constraint, and the shape of the return dict — solid behavioral context. However, it never says whether the dataset is modified in place or a new dataset is produced, nor whether the operation is reversible, which matters for a mutation tool with zero annotation coverage.

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 core behavioral statement is front-loaded in the first two sentences before the Args block, and each arg line is terse and informative. Slight redundancy in restating defaults that also appear in the schema, but nothing is wasted overall.

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?

For a five-parameter mutation tool with no annotations and no output schema, the definition covers purpose, prerequisites, per-parameter semantics, and the return structure. The remaining gap is the mutation/in-place behavior and what happens to the dataset handle, which an agent may need before calling.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it does: every one of the five parameters is explained with meaning, allowed values ('k_best', 'mutual_info', 'variance', 'correlation'), defaults, and conditional semantics (target_column required for k_best/mutual_info on a plain dataset). It also disambiguates threshold's meaning per method, which the schema cannot express.

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 a specific verb and resource ("Remove unhelpful numerical features") plus scope ("Only numerical feature columns are evaluated; other columns are kept"), which separates it from pure analysis siblings like analyze_correlation. It stops short of naming the closest alternative (drop_column) for manual removal, so differentiation is implied rather than explicit.

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

Usage Guidelines4/5

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

Gives a concrete prerequisite ("Scored methods need no missing values (run impute_missing first)") that points the agent to a specific sibling and ordering. It also states the conditional requirement on target_column per method. It does not say when to prefer this over drop_column or analyze_correlation, which keeps it below a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools