Skip to main content
Glama

prepare_dataset

Split a dataset for classification or regression, fit preprocessing only on training rows, and save a reusable preprocessing artifact with its handle and schema.

Instructions

Split a named dataset for classification or regression and fit preprocessing on training rows only. Saves a preprocessing artifact and returns its handle and schema. Training tools fit their own preprocessing.

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).
delimiterNoCSV delimiter (comma, semicolon, tab, pipe). Auto.
task_typeYes'classification' or 'regression'.
test_sizeNoTest fraction (default 0.2).
random_stateNoRandom seed (default 42).
target_columnYesTarget variable column.
exclude_columnsNoFeature columns to exclude before preprocessing/training.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 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"
      +}
  2. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose real behavior: preprocessing is fit on training rows only (leakage-safe), a preprocessing artifact is persisted, and the response contains a handle plus schema. It stops short of saying where the artifact is written, whether repeated calls overwrite it, or how errors on bad columns surface.

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?

Three short sentences, front-loaded with the core action and followed by the side effect and the sibling boundary. No filler or repetition of the 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 an eight-parameter tool with no annotations and no output schema, the description covers the action, the persisted side effect, and the shape of the return value (handle and schema), which is what the absent output schema would otherwise need to convey. Remaining gaps—artifact location, overwrite semantics, error behavior—are modest.

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 eight parameters is already documented in the schema, setting the baseline at 3. The description adds conceptual context (preprocessing excludes features via exclude_columns, training-row-only fitting) but no syntax, defaults, or format detail beyond 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 ('Split a named dataset'), scopes it to classification or regression, and separates it from training tools by noting those fit their own preprocessing. An agent can tell what this tool produces (a split plus a fitted preprocessing artifact) without opening the schema.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the artifact-and-handle output suggests it precedes a training step, and 'Training tools fit their own preprocessing' clarifies a boundary with start_training_job/train_baseline. However it never explicitly says when to call it, what to do with the returned handle, or when inspect_dataset or create_split_manifest would be preferred.

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