Skip to main content
Glama

Gradient Boosting Regressor

gradient_boosting_regressor

Train a boosted regression model on numerical tabular data from a prepared train/test split and return train/test metrics, top features, and warnings for evaluation.

Instructions

Train a gradient boosting regressor (scikit-learn): shallow trees added one at a time, each correcting the errors of the previous ones. Often the most accurate classical model on tabular data. The split must have only numerical, complete features (no scaling is needed). Args: split_id (str): ID of a split made by train_test_split. n_estimators (int): Number of boosting stages. Default is 100. learning_rate (float): Shrinkage per stage, greater than 0. Lower values need more estimators. Default is 0.1. max_depth (int): Depth of each tree. Default is 3. subsample (float): Fraction of rows used per tree, in (0, 1]. Below 1 gives stochastic boosting. Default is 1.0. min_samples_leaf (int): Minimum rows in a leaf. Default is 1. random_state (int): Seed. Default is 42. Returns: dict: model_id, train/test metrics (R2, MAE, MSE, RMSE, MAPE), top features and warnings.

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": {
      "split_id": "<split_id>"
    },
    "name": "gradient_boosting_regressor"
  }
}

Input Schema

NameRequiredDescriptionDefault
split_idYes
max_depthNo
subsampleNo
n_estimatorsNo
random_stateNo
learning_rateNo
min_samples_leafNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it does disclose the training cost profile indirectly (sequential boosting stages, n_estimators × learning_rate tradeoff) plus the hard input constraint of complete numerical features. It also reveals that warnings are returned, hinting the call can partially succeed. It stops short of saying whether the fitted model is persisted, how long training takes on large splits, or what the warnings typically indicate.

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?

Purpose is front-loaded in the first two sentences, then the constraint, then a compact Args/Returns block that is easy to scan. Minor waste: defaults are restated for every parameter even though the schema already encodes them, which lengthens the block without adding information.

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?

With no output schema and seven parameters, the description correctly supplies a Returns section naming model_id, the six metrics, top features, and warnings. What is thin is downstream context — what model_id is used for (prediction, comparison, benchmarking) and whether models from this tool feed compare_models or benchmark_models — which an agent selecting among many modeling siblings would benefit from.

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 documents all seven parameters with meaning, valid domain, and effect: subsample in (0, 1] with below 1 meaning stochastic boosting, learning_rate > 0 with the note that lower values need more estimators, min_samples_leaf as row count in a leaf. This adds genuine semantics well beyond bare types and defaults in the schema.

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?

Opens with a specific verb+resource ("Train a gradient boosting regressor (scikit-learn)") and adds a one-line behavioral characterization ("shallow trees added one at a time, each correcting the errors of the previous ones"). It distinguishes itself from the classifier sibling by naming the regressor and by listing R2/MAE/RMSE/MAPE metrics, though it never explicitly contrasts with random_forest_regressor or xgboost_regressor.

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?

Provides a real precondition ("The split must have only numerical, complete features (no scaling is needed)") and a soft usage signal ("Often the most accurate classical model on tabular data"), which implies when it is a good pick. It gives no explicit when-not guidance and does not route the agent to or away from comparable siblings such as xgboost_regressor or random_forest_regressor.

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