Skip to main content
Glama

get_model_leaderboard

Run cross-validation to rank candidate models and return the winner’s model ID, parameters, and score, optionally restricting candidates to selected models.

Instructions

Run fresh cross-validation and return ranked trials plus the winner's model ID, parameters and score. Pass models to restrict candidates. Use automl_run for full run metadata or list_experiments to find saved training records. Use export_model to fit and save a model bundle.

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": {
      "name": "<name>",
      "target_column": "<target_column>",
      "task_type": "<task_type>"
    },
    "name": "get_model_leaderboard"
  }
}

Input Schema

NameRequiredDescriptionDefault
cvNoCross-validation folds (default 3).
nameYesDataset filename.
metricNoSelection metric. auto (default) uses roc_auc for binary classification, f1 for multiclass classification or r2 for regression. Loss metrics rank lowest first.
modelsNoOrdered task-specific model IDs. Omit for defaults. Both tasks support decision_tree, random_forest, extra_trees, hist_gradient_boosting, svm, knn. Classification also has logistic_regression; regression has linear_regression and ridge_regression. Caps may stop search before all models are scored. Ties retain evaluation order.
delimiterNoCSV delimiter character: comma (,), semicolon (;), tab (\t) or pipe (|). Omit to detect it automatically.
task_typeYes'classification' or 'regression'.
max_trialsNoTotal candidate and tuning trials, 1–50 (default 10).
random_stateNoRandom seed (default 42).
target_columnYesTarget variable column.
exclude_columnsNoFeature columns to exclude before preprocessing/training.
max_time_secondsNoShared candidate and tuning time budget in seconds (default 600). A trial already in progress may finish after the deadline.
split_manifest_idNoID of a validated split manifest to enforce indices.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.3.4
    • changedInput schema / properties / delimiter / description
      Previous value: -"CSV delimiter (comma, semicolon, tab, pipe). Auto."New value: +"CSV delimiter character: comma (,), semicolon (;), tab (\\t) or pipe (|). Omit to detect it automatically."
    • changedInput schema / properties / max_time_seconds / description
      Previous value: -"Max wall-clock seconds (default 600)."New value: +"Shared candidate and tuning time budget in seconds (default 600). A trial already in progress may finish after the deadline."
    • changedInput schema / properties / max_trials / description
      Previous value: -"Max models to evaluate (default 10)."New value: +"Total candidate and tuning trials, 1–50 (default 10)."
    • changedInput schema / properties / metric / description
      Previous value: -"Selection metric (default auto)."New value: +"Selection metric. auto (default) uses roc_auc for binary classification, f1 for multiclass classification or r2 for regression. Loss metrics rank lowest first."
    • addedInput schema / properties / models
      Added value: +{
      +  "description": "Ordered task-specific model IDs. Omit for defaults. Both tasks support decision_tree, random_forest, extra_trees, hist_gradient_boosting, svm, knn. Classification also has logistic_regression; regression has linear_regression and ridge_regression. Caps may stop search before all models are scored. Ties retain evaluation order.",
      +  "items": {
      +    "minLength": 1,
      +    "pattern": "\\S",
      +    "type": "string"
      +  },
      +  "minItems": 1,
      +  "type": "array",
      +  "uniqueItems": true
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / delimiter
      Added value: +{
      +  "description": "CSV delimiter (comma, semicolon, tab, pipe). Auto.",
      +  "type": "string"
      +}
    • addedInput schema / properties / exclude_columns
      Added value: +{
      +  "description": "Feature columns to exclude before preprocessing/training.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / split_manifest_id
      Added value: +{
      +  "description": "ID of a validated split manifest to enforce indices.",
      +  "type": "string"
      +}
  3. Added

TDQS

A4.2/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 burden — and it discloses the two least obvious traits: the operation runs fresh cross-validation (i.e. real compute, side effects on time budget) and it does not persist a bundle (export_model is required for that). It omits idempotency/persistence details and any permission or cost warnings beyond what the schema's max_time_seconds implies.

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?

Four short sentences, front-loaded with the operation and its return shape, then routing cues. No filler, no restatement of the name, and each sentence directs a distinct action.

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 12-parameter compute-heavy tool with no annotations and no output schema, the definition covers purpose, return summary, candidate restriction and sibling routing — enough to call it correctly. It leaves unstated whether results are persisted or how expensive repeat invocations are, which an agent budgeting calls would want to know.

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%, so every one of the 12 parameters is already documented, including the model caps and tie-breaking rules. The description adds only the one-line 'Pass models to restrict candidates', which the schema's models field already covers in more detail. Baseline 3 is appropriate since the schema does the heavy lifting.

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?

States a specific verb and resource — 'Run fresh cross-validation and return ranked trials plus the winner's model ID, parameters and score' — and crucially clarifies that despite the 'get_' prefix this computes rather than retrieves a cached list. That distinguishes it from list_models, list_experiments and automl_run.

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?

Explicitly routes the agent to alternatives with conditions: automl_run for full run metadata, list_experiments for saved training records, export_model to fit and save a bundle. It also states when to use the models parameter ('Pass models to restrict candidates'). It stops short of stating when NOT to call this (e.g. cost/latency reasons for repeated calls), so not a full 5.

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