Skip to main content
Glama

prepare_dataset

Set the target column, task type, and train/test split, then fit preprocessing on training data only to avoid leakage before model training.

Instructions

Define target and task type; fit preprocessing on training data only.

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

Input Schema

NameRequiredDescriptionDefault
nameYesDataset filename.
stratifyNoStratify split (classification only, default true).
task_typeYes'classification' or 'regression'.
test_sizeNoTest fraction (default 0.2).
random_stateNoRandom seed (default 42).
target_columnYesTarget variable column.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.6/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, and it largely does not. It does disclose one valuable trait — preprocessing is fit on training data only, avoiding leakage — but says nothing about whether the dataset file is modified, whether a new artifact or handle is returned, or what the output contains. For a state-changing preparation step this is a significant gap.

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?

A single compact sentence with no wasted wording, and the most important constraint (train-only fitting) is placed prominently. It is arguably too compressed, with two ideas joined by a semicolon, but structurally it is clean.

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?

With six parameters, no annotations, and no output schema, the definition should explain the output artifact and any side effects on the input dataset. Instead it supplies two terse clauses and leaves return values, mutation semantics, and error conditions unspecified. The agent can fill in the parameters from a rich schema but not the tool's behavior.

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 parameter including name, target_column, task_type, test_size, random_state, and stratify is already documented in the schema, making 3 the baseline. The description mentions target and task type, but that only repeats what the schema fields already say and adds no format or interaction detail. No compensating value is provided for the split-related parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the core action — defining the target column and task type and fitting preprocessing on training data — which is more specific than a tautology. However, it never says plainly that the tool splits a dataset into train/test and returns a prepared artifact, so the agent must infer the main effect from the parameter names. It does read as a pipeline step distinct from inspect_dataset or train_baseline, but only implicitly.

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?

There is no statement of when to call this versus analyze_data_quality, train_baseline, or the other siblings. The phrase 'fit preprocessing on training data only' hints at a modeling pipeline position but gives no prerequisites or ordering guidance. The agent is left to infer usage from the tool name alone.

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