Skip to main content
Glama

automl_run

Runs a synchronous cross-validation search across selected models, ranks trials, returns the winner and run metadata, and optionally tunes the top candidate while reserving split-manifest test rows.

Instructions

Run a fresh, synchronous cross-validation search and return ranked trials, winner and run metadata. Optionally tune the leading candidate when Optuna and budget remain. Provide a split_manifest_id to reserve its test rows. Use tune_model for one algorithm. Search returns scores and parameters without saving fitted models.

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": "automl_run"
  }
}

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. Changed9 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, max 50)."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."
    • changedInput schema / properties / models / description
      Previous value: -"Subset of models to evaluate."New value: +"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."
    • addedInput schema / properties / models / items / minLength
      Added value: +1
    • addedInput schema / properties / models / items / pattern
      Added value: +"\\S"
    • addedInput schema / properties / models / minItems
      Added value: +1
    • addedInput schema / properties / models / uniqueItems
      Added value: +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
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose important behavior: the call is synchronous, the search is fresh, and no fitted models are saved ('Search returns scores and parameters without saving fitted models'), which signals the agent must retrain later. It also notes split_manifest_id reserves test rows. However it omits permission/auth expectations and how the time budget interacts with the synchronous call beyond the schema's field text, leaving real gaps for a mutation-adjacent, long-running operation.

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 dense sentences, front-loaded with the primary action and return value, followed by conditional behavior, the split-manifest caveat, and the sibling routing. No redundant restatement of the name or title.

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 tool with no annotations and no output schema, the description supplies the essentials: synchronous fresh search, ranked trial/winner return shape, optional tuning, and the fact that no models are persisted. It could go further on failure modes and the interaction between the shared time budget and synchronous execution, but nothing critical for correct invocation is missing.

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?

Schema coverage is 100%, so the baseline is 3, and the description adds meaning beyond the schema: split_manifest_id 'reserves its test rows' clarifies that those rows are held out rather than merely validated, and models/optuna gating for the tuning phase explains when the tuning budget applies. Remaining parameters (cv, metric, max_trials) are left entirely to the schema.

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 a fresh, synchronous cross-validation search' - plus what it returns (ranked trials, winner, run metadata). It explicitly contrasts itself with the sibling tune_model ('for one algorithm'), so an agent can distinguish the two without opening either schema.

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 clear when-to-use routing: use this for a full search across models, use tune_model for a single algorithm. It also explains the conditional tuning step ('Optionally tune the leading candidate when Optuna and budget remain'). It stops short of naming exclusions against other training siblings like train_baseline or start_training_job, so not a 5.

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