Skip to main content
Glama

stats regression

stats_regression
Read-only

Linear trend and forecast for a number series: least-squares slope and intercept, correlation, R-squared, the slope's standard error, 95% interval, t-statistic and p-value, a plain verdict (rising, falling, no significant trend), and an optional forecast for the next 1-100 steps with a 95% prediction band. Give y alone for an evenly spaced series or x and y pairs. Up to 10,000 points. $0.002. Costs $0.002 USDC per call (x402).

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>"
    },
    "name": "stats_regression"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNooptional, same length
yYes
forecastNosteps ahead, 0-100

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Goes well beyond the readOnlyHint/openWorldHint annotations by disclosing real operational facts: a paid endpoint ($0.002 USDC per call via x402), a 10,000-point ceiling, and the 1-100 forecast horizon with a 95% prediction band. What is not covered is failure behavior (unequal x/y lengths, non-numeric input) or whether payment is charged on error.

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?

Front-loads the core purpose and the full output inventory in one dense but scannable sentence, then adds input shape and limits. The only waste is the cost stated twice ('$0.002.' followed by 'Costs $0.002 USDC per call (x402).'), which is minor redundancy rather than clutter.

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 no output schema, the description carries the full return-value burden and does so by enumerating every statistic returned plus the verdict phrasing. The gaps are edge-case handling: unequal-length x/y, minimum sample size for the t-test, and behavior when the series is constant.

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?

At 67% schema coverage the description compensates usefully, explaining that x is optional and must be the same length as y, and that omitting it means an evenly spaced series. It also restates the forecast range, though awkwardly: the description says '1-100 steps' while the schema says '0-100', a small inconsistency the agent must resolve.

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?

Names a specific analysis (least-squares linear trend) and enumerates the exact outputs: slope, intercept, correlation, R-squared, standard error, t-statistic, p-value, verdict, optional forecast with prediction band. That level of specificity makes it trivially distinguishable from stats_describe or stats_ab_test, which do not produce trend/forecast output.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete invocation guidance: supply y alone for an evenly spaced series, or x and y pairs, capped at 10,000 points. It does not name when to prefer a sibling instead (e.g., a plain summary stat tool), but the described use case is narrow enough that the agent can self-select accurately.

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