Skip to main content
Glama

BRAINIAC Predictive & Customer Analytics

Train a CART decision tree

predictive-analytics_decision-tree-train
Read-onlyIdempotent

Fit a classification or regression CART tree with depth and leaf limits, readable rules, feature importance and optional predictions. Price $0.03 USDC. POST /api/v1/predictive-analytics/decision-tree-train. An unpaid call returns the x402 payment terms and does not run.

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": {
      "task": "<task>",
      "columns": "<columns>",
      "rows": "<rows>",
      "target": "<target>"
    },
    "name": "predictive-analytics_decision-tree-train"
  }
}

Input Schema

NameRequiredDescriptionDefault
rowsYesrows, array. Required.
taskYestask, string, one of classification, regression. Required.
targetYestarget, array. Required.
columnsYescolumns, array. Required.
predictNopredict, array. Optional.
maxDepthNomaxDepth, integer, from 1 to 20. Required.
minSamplesLeafNominSamplesLeaf, integer, from 1 to 1000. Required.

Output Schema

NameRequiredDescriptionDefault
capsNocaps. Object.
treeNotree. Object.
rulesNorules. Array.
sourcesNosources. Array.
rowsUsedNorowsUsed. Number.
warningsNowarnings. Array.
droppedRowsNodroppedRows. Number.
limitationsNolimitations. Array.
predictionsNopredictions. Array.
trainAccuracyNotrainAccuracy. Number.
featureImportanceNofeatureImportance. Object.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds behavior that structured fields cannot express: a $0.03 USDC price, the POST endpoint, and the x402 payment handshake on unpaid calls. The only tension is that a "train" operation is declared readOnlyHint=true, but since the schema returns rules and predictions rather than persisting a model, this reads as stateless compute rather than a contradiction.

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 tight sentences, capability first, then price, then endpoint and the unpaid-call caveat. Nothing is padded and the most decision-relevant facts (what it does, what it costs, what happens if unpaid) are front-loaded.

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?

With an output schema present, return values need not be described, and the description still hints at them. For a 7-parameter modeling tool with a payment gate, the description covers the operational essentials; only the relationship between rows, columns and target is left entirely to the schema.

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 coverage is 100%, so baseline is 3. The description gestures at maxDepth/minSamplesLeaf via "depth and leaf limits" and at predict via "optional predictions," but adds no format, defaulting, or constraint detail beyond what the schema already documents.

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

Purpose4/5

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

"Fit a classification or regression CART tree" gives a specific verb and named algorithm, and the sentence continues with concrete outputs (readable rules, feature importance, optional predictions) that separate it from siblings like random-forest-importance or kmeans-cluster. It stops short of explicitly naming which sibling to choose for tree-based importance, so it is clear but not fully differentiated.

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?

The description implies usage (supervised modeling with a target column) but never states when to pick this over random-forest-importance or another classifier. It does add genuinely useful invocation guidance around payment: an unpaid call returns x402 terms and does not run, so the agent knows the first call may be a no-op.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources