Skip to main content
Glama

train_model

Train machine learning models for classification or regression with configurable persistence and optional hyperparameter tuning.

Instructions

Train a machine learning model with configurable persistence (memory-only, filesystem, or hybrid storage)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataset_nameNoName of the loaded dataset (use list_datasets to see available datasets)
dataset_pathNoPath to the dataset file (CSV, JSON, Parquet) - alternative to dataset_name
target_columnYesName of the target/label column
algorithmNoMachine learning algorithm to userandom_forest
model_typeNoType of machine learning problemauto
test_sizeNoProportion of data to use for testing
enable_tuningNoEnable hyperparameter tuning
cv_foldsNoNumber of cross-validation folds
random_stateNoRandom state for reproducibility
feature_columnsNoSpecific feature columns to use (optional)
output_nameNoName for the trained model (optional)
persistence_modeNoHow to store artifacts: memory_only (in-memory, MCP-friendly), filesystem (traditional files), hybrid (both)memory_only
validation_sizeNoProportion of training data to use for validation
stratifyNoUse stratified sampling for train/test split
tuning_methodNoHyperparameter tuning method (used when enable_tuning=true)grid_search
tuning_cvNoNumber of CV folds for hyperparameter tuning
tuning_scoringNoScoring metric for hyperparameter tuning (optional)
max_iterNoMaximum iterations for iterative algorithms
enable_cross_validationNoEnable cross-validation during training
scoring_metricsNoList of scoring metrics for evaluation
save_modelNoSave the trained model
save_metricsNoSave training metrics
save_predictionsNoSave model predictions
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It mentions persistence modes but omits critical details such as failure modes, computational cost, side effects on system state, or what the tool returns. The agent lacks insight into runtime behavior.

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 description is a single sentence that efficiently conveys the primary purpose and a key differentiator (persistence). It is front-loaded and contains no unnecessary words, though it could be slightly expanded to include essential usage context.

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 of the tool (23 parameters, no output schema), the description is insufficiently complete. It does not explain return values, error handling, or how the trained model can be used subsequently. The agent would need to rely solely on the schema, which lacks behavioral context.

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 the baseline is 3. The description adds no additional meaning beyond what the schema already provides for each parameter. While the schema is comprehensive, the description does not enhance understanding of parameter interactions or usage patterns.

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?

The description clearly states the tool's purpose: training a machine learning model. It specifies a key differentiator—configurable persistence (memory-only, filesystem, or hybrid)—which distinguishes it from sibling tools like evaluate_model or tune_hyperparameters.

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?

The description provides no explicit guidance on when to use this tool versus siblings. It does not mention prerequisites (e.g., a loaded dataset) or context-specific recommendations, leaving the agent to infer usage from the schema and tool name alone.

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/Yasserelhaddar/MCP-DS-Toolkit-Server'

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