Skip to main content
Glama

ScorpTech x402 Tools

Regression Fit

regression_fit
Read-onlyIdempotent

Fit a regression model and get the full statistical table, like R's summary(lm) or statsmodels. Linear, polynomial (degree 2–6), exponential (y = a·e^(bx)), logarithmic, power (y = a·x^b), multiple linear (many named predictors) and binary logistic regression (IRLS, odds ratios, McFadden pseudo-R², accuracy). Returns coefficients with standard errors, t / z statistics, p-values and confidence intervals, R² and adjusted R², residual standard error, F-test, AIC / BIC, a residual summary, the fitted equation, and predictions with confidence and prediction intervals. model=best ranks the single-predictor models by adjusted R² on the original scale. Numerically stable Householder QR. Returns JSON with: model, n, equation, coefficients, rSquared, adjRSquared, residualStdError, dfModel. Price: $0.003 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/regression-fit

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": {
      "x": "<x>",
      "y": "<y>"
    },
    "name": "regression_fit"
  }
}

Input Schema

NameRequiredDescriptionDefault
xYesPredictor values; for model=multiple / logistic an array of rows ([[x1, x2], ...]) or a single list
yYesResponse values (0/1 for logistic); max 20,000 points
modelNolinear
namesNoPredictor names (multiple / logistic)
degreeNo
predictNox values (or rows) to predict
interceptNo
confidenceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive behavior, and the description adds real context beyond that: a $0.003 USDC x402 price per successful call, a Base/Solana payment requirement, an HTTPS mirror, the Householder QR algorithm, and the statistical outputs produced. The only blemish is that the final 'Returns JSON with' list is a strict subset of the fields promised earlier (no F-test, AIC/BIC, or predictions), leaving a small ambiguity about the actual payload.

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?

It is front-loaded with the purpose, then models, then outputs, then pricing, which is a sensible order. It is dense and somewhat repetitive, restating the return contents twice with differing detail, but no sentence is pure filler.

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 8-parameter tool with no output schema, the description does most of the heavy lifting: model families, output statistics, pricing, and endpoint are all covered. Gaps remain around the intercept flag and the exact response shape, which matters since no output schema exists to fill them in.

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?

With only 50% schema coverage, the description compensates well: it defines what each model value means mathematically, explains that names applies to multiple/logistic predictors, that degree covers polynomial 2–6, and that predict yields confidence and prediction intervals. The intercept and confidence parameters are still unexplained, and the per-model applicability of degree/names must be inferred.

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 and resource ('Fit a regression model') and then enumerates every supported model family with formulas (exponential y = a·e^(bx), power y = a·x^b), so an agent knows exactly what this computes. It is clearly a curve/statistics fitting tool, distinct from the numeric-theory siblings listed.

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: model=best is explained as ranking single-predictor models by adjusted R², and the model enum shows which variant to pick. But there is no explicit when-to-use/when-not guidance and no named alternative (e.g. envelope_fit) for overlapping fitting needs, so selection still requires inference.

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