Skip to main content
Glama

BRAINIAC Predictive & Customer Analytics

ROC, PR, Brier and calibration metrics

predictive-analytics_classification-metrics
Read-onlyIdempotent

Compute ROC-AUC, average precision, Brier score, confusion at a threshold, Youden-optimal threshold and equal-width calibration bins from binary labels and scores. Price $0.02 USDC. POST /api/v1/predictive-analytics/classification-metrics. 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": {
      "labels": "<labels>",
      "scores": "<scores>"
    },
    "name": "predictive-analytics_classification-metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelsYeslabels, array. Required.
scoresYesscores, array. Required.
thresholdNothreshold, number, from 0 to 1. Required.
calibrationBinsNocalibrationBins, integer, from 2 to 100. Required.

Output Schema

NameRequiredDescriptionDefault
brierNobrier. Number.
prAucNoprAuc. Number.
rocAucNorocAuc. Number.
sourcesNosources. Array.
youdenJNoyoudenJ. Number.
confusionNoconfusion. Object.
calibrationNocalibration. Array.
limitationsNolimitations. Array.
youdenThresholdNoyoudenThreshold. Number.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered. The description adds genuinely non-obvious behavior beyond that: the $0.02 USDC price, the POST endpoint, and the crucial fact that an unpaid call returns x402 payment terms and does not execute. That payment-gate behavior is exactly the kind of context annotations cannot convey.

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 tightly packed sentences: metrics first, then cost, then endpoint and the payment-failure behavior. Nothing is redundant and the most decision-relevant information is 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?

An output schema exists, so return structure need not be described, and the description covers inputs, cost, transport and failure mode. Minor gaps remain: it does not say whether labels and scores must be equal length or what happens on mismatched arrays, which matters for a two-array input tool.

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?

Schema description coverage is 100%, so the baseline is 3. The description earns a bump by linking parameters to outcomes: 'confusion at a threshold' and 'Youden-optimal threshold' explain what the threshold argument changes, and 'equal-width calibration bins' explains what calibrationBins controls, which the terse schema labels ('calibrationBins, integer, from 2 to 100. Required.') do not.

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?

The description opens with a specific verb ('Compute') and enumerates the exact metric family returned: ROC-AUC, average precision, Brier score, confusion at a threshold, Youden-optimal threshold and equal-width calibration bins. That specificity clearly separates it from siblings such as correlation-analysis or decision-tree-train, which perform different statistical work.

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?

It implies the precondition 'from binary labels and scores', which tells an agent the input shape needed, but it never states when to choose this over an alternative metric tool or when not to use it. No exclusions, prerequisites about label/score length agreement, or guidance about picking a threshold strategy are given.

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