Skip to main content
Glama

dashai_train_model

Train a model on a dataset and get the enqueued job ID. This tool creates the experiment, run, and job in one call, returning immediately so progress can be polled separately.

Instructions

Trains a model on a dataset and returns the id of the enqueued job.

It does NOT wait for it to finish. Training can take minutes or hours, so dashAI enqueues it and this tool returns immediately; progress is polled with dashai_job_status.

Collapses the three calls the raw API demands:

  1. POST /model-session/ creates the experiment (dataset, task, columns, metrics)

  2. POST /run/ creates the run (model, hyperparameters)

  3. POST /job/ enqueues the ModelJob

Args: params (TrainModel): contains: - dataset_id (int), task_name (str), model_name (str) - input_columns / output_columns (List[str]) - metrics (List[str]), goal_metric (str) - parameters (Dict): model hyperparameters - splits (Dict[str, float]): proportions adding up to 1.0 - optimizer_name (str), optimizer_parameters (Dict) - run_name (Optional[str])

Returns: str: JSON {"job_id": str, "run_id": int, "model_session_id": int, "status": "enqueued", "next_step": str} On failure: "Error: ..." stating which parameter dashAI rejected.

Examples: - "Train a random forest on dataset 3 predicting 'species'" - Do not use it to read results: that is dashai_get_run, with the run_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations provide readOnlyHint=false, destructiveHint=false, idempotentHint=false, but the description adds critical behavioral context: it enqueues a job and returns immediately, does not wait, training can take minutes/hours, and it collapses three raw API calls. Error behavior is also described ('On failure: "Error: ..." stating which parameter dashAI rejected'). This goes well beyond annotation data.

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 structured with clear paragraphs: function, async behavior, API collapsation, Args, Returns, Examples. Every sentence adds value, but the Args section largely duplicates schema information and makes the description longer than strictly necessary. Still, it is front-loaded with the most important usage rules and alternative references.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (async, multi-step training, many parameters, output schema), the description covers all necessary context: how it works, how to poll, what returns, error handling, and how it differs from siblings. It even provides usage examples. No significant gap remains.

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?

The schema already has detailed descriptions for nested TrainModel properties. The description's Args section condenses these into a readable list and adds context by explaining that the parameters map to the three API calls (session, run, job). It also notes 'proportions adding up to 1.0' for splits, reinforcing the schema. This adds semantic clarity beyond the raw schema, especially given the top-level schema coverage is 0%.

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?

Description opens with 'Trains a model on a dataset and returns the id of the enqueued job.' This is a specific verb+resource statement that clearly distinguishes the tool from siblings like dashai_get_run ('Do not use it to read results') and dashai_job_status (polling). It also details the collapsed API calls, leaving no ambiguity about what the tool accomplishes.

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

Usage Guidelines5/5

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

Explicitly states when to use: 'It does NOT wait for it to finish... progress is polled with dashai_job_status.' Provides a clear exclusion: 'Do not use it to read results: that is dashai_get_run, with the run_id.' This gives direct when/when-not guidance relative to siblings.

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/Maarmapa/dashai-mcp'

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