Skip to main content
Glama

MaCalculatriceEnLigne

Calculate Linear Regression

calculate_linear_regression
Read-onlyIdempotent

Calculate linear regression slope and intercept from summary statistics. Returns: {error}. See list_bundles for related 'math' calculators.

Input Schema

NameRequiredDescriptionDefault
nYesNumber of data points
sum_x2YesSum of (xi-x_mean)²
sum_xyYesSum of (xi-x_mean)*(yi-y_mean)
x_meanYesMean of x values
y_meanYesMean of y values

Output Schema

NameRequiredDescriptionDefault
resultNoComputed result. Object whose fields depend on the tool (e.g. {tax, marginal_rate, brackets} for tax tools, {volume_l, gallons} for volume tools).
sourceNoAuthoritative source for the rule or formula (e.g. "Article 197 CGI", "NF DTU 21").
formulaNoHuman-readable formula or method used (e.g. "I=P·r·t", "Magnus formula").
reference_urlNoLink to a calcul2 page documenting the calculation in detail.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.1/5.0
Behavior2/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is fully covered. The description adds nothing behavioral beyond that, and 'Returns: {error}' reads like an unfilled template placeholder that conveys no real information about output or failure behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with the core computation front-loaded, which is good. But 'Returns: {error}' is an unresolved placeholder that consumes space without earning it.

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 and full annotations exist, so the description need not explain returns or safety. The parameter set is fully documented in the schema. Still, the description is thin for a math tool with a formula-dependent input convention (centered sums, not raw sums), and the list_bundles pointer is only marginally relevant.

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% and all five required parameters are individually documented, so the schema carries the burden. The description adds only the collective term 'summary statistics' and clarifies no individual parameter semantics beyond what the schema states — baseline 3 is appropriate.

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?

States a specific verb (calculate) and resource (linear regression slope and intercept), plus the input modality ('from summary statistics'). It is clear what the tool computes, though it does not distinguish itself from near-siblings like calculate_slope or calculate_statistics.

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?

'From summary statistics' implies the input precondition (you must already have means and sums, not raw data), which is genuinely useful context. However, there is no explicit when-to-use/when-not guidance, and the pointer to 'list_bundles for related math calculators' is a navigation hint rather than a decision rule for choosing this tool over calculate_slope.

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.