Skip to main content
Glama

BRAINIAC Statistics & Quality Engineering

Fit a multiple linear regression

statistics_linear-regression
Read-onlyIdempotent

Ordinary least squares by Householder QR with coefficient standard errors, t-tests and intervals, R-squared, F, VIF, Durbin-Watson, Breusch-Pagan and confidence and prediction intervals. Matches NIST StRD Norris and Longley. Price $0.05 USDC. POST /api/v1/statistics/linear-regression. 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": {
      "y": "<y>",
      "X": "<X>"
    },
    "name": "statistics_linear-regression"
  }
}

Input Schema

NameRequiredDescriptionDefault
XYesX, array. Required.
yYesy, array. Required.
namesNonames, array. Optional.
predictNopredict, array. Optional.
interceptNointercept, boolean. Required.
confidenceNoconfidence, number. Required.

Output Schema

NameRequiredDescriptionDefault
FNoF. Number.
nNon. Number.
dfModelNodfModel. Number.
sourcesNosources. Array.
rSquaredNorSquared. Number.
dfResidualNodfResidual. Number.
residualSdNoresidualSd. Number.
adjRSquaredNoadjRSquared. Number.
droppedRowsNodroppedRows. Number.
limitationsNolimitations. Array.
predictionsNopredictions. Array.
breuschPaganNobreuschPagan. Object.
coefficientsNocoefficients. Array.
durbinWatsonNodurbinWatson. Number.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered. The description adds genuinely useful non-schema behavior: a $0.05 USDC price, the POST endpoint, and the fact that an unpaid call returns x402 payment terms without executing. It does not disclose failure modes (singular X, rank deficiency, null handling) that matter for a numerical routine.

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?

Two dense sentences, front-loaded with the method and outputs, then the commercial/transport facts. The long statistics enumeration is somewhat list-like but each item is informative; nothing is padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so the return-value enumeration is partly redundant, and the description omits the one thing the schema cannot convey well: that X is a matrix of observations-by-regressors aligned with y. Payment and endpoint details are a real completeness win, but data-shape and error behavior are missing for a 6-parameter numerical tool.

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 the schema already documents y, X, names, predict, intercept and confidence, and the baseline of 3 applies. The description's mention of 'confidence and prediction intervals' hints at the confidence and predict parameters but adds no format, shape, or alignment semantics beyond the schema.

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?

The description names the estimation method (ordinary least squares via Householder QR) and enumerates the fitted outputs, which unambiguously identifies this as a linear-model fitting tool and separates it from siblings like statistics_logistic-regression or statistics_anova. It never states the plain verb+resource ('fit a regression of y on X'), relying on the title and technical vocabulary instead, so it is clear to an expert but not maximally explicit.

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 guidance on when to choose this over statistics_logistic-regression, statistics_anova, or the other siblings, and no stated preconditions on data shape or sample size. The only conditional behavior described is the payment path, not usage selection.

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