# Microgram: dtree-train

`station__algovigilance__microgram-dtree-train` · native (always callable) · domain `algovigilance` · pv-relevance `pv-core`

Train a decision tree classifier from labeled data. Returns the fitted tree as JSON for use with predict/prune/export. Use when building a classifier from tabular feature data.

## Agent metadata

- `idempotent`: true
- `read_only`: true
- `expected_latency_ms`: unknown (not yet contract-tested)
- `cost_tokens_estimate`: unknown

## Input schema

- `features` *object* (required) — 2D array of feature values (rows = samples, cols = features)
- `labels` *object* (required) — Array of class labels (one per sample)
- `feature_names` *object* — Names for each feature column
- `max_depth` *number* — Maximum tree depth (default: 10)
- `min_samples_split` *number* — Minimum samples to split a node (default: 2)
- `criterion` *string* — Split criterion: gini, entropy, or gain_ratio (default: gini)

## Example call

```json
POST /api/mcp
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "station__algovigilance__microgram-dtree-train",
    "arguments": {
      "features": {},
      "labels": {}
    }
  }
}
```

## Related

- [/tools](/tools) — all 7718 tools
- [/tools/algovigilance__microgram-dtree-train](/tools/algovigilance__microgram-dtree-train) — HTML page
- [/tools/algovigilance__microgram-dtree-train/json](/tools/algovigilance__microgram-dtree-train/json) — JSON form (agent-friendly)
- [/api/mcp](/api/mcp) — endpoint
- [/AGENTS.md](/AGENTS.md) — agent guide
