Skip to main content
Glama

linear_regression

Fit ordinary least-squares regression, simple or multiple, from inline data or file references, and report coefficient inference for statistical analysis.

Instructions

Fit an ordinary least-squares regression, simple or multiple, and report coefficient inference.

``x`` and ``y`` may be passed inline or as ``"@<path>"`` file references;
a file for ``x`` may contain a one- or two-dimensional array.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYes
yYes
feature_namesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose genuinely non-obvious behavior: x/y may be inline or '@<path>' file references and x files may be 1D or 2D. However it says nothing about error conditions, output content, or side effects for a statistical fit.

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?

Two tight sentences, purpose front-loaded, and the format conventions follow with no wasted words.

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?

No annotations and no output schema, with a 3-param tool at 0% schema coverage. The description covers x and y adequately but omits feature_names and any indication of what the reported 'coefficient inference' contains, leaving gaps an agent would need.

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 coverage is 0%, so the description must compensate. It adds real meaning for x and y (inline vs file reference, 1D/2D array shape for x), but leaves feature_names entirely undocumented and does not clarify required-vs-optional status.

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 and resource: 'Fit an ordinary least-squares regression, simple or multiple, and report coefficient inference.' The OLS specification implicitly separates it from glm, mixed_lm, and curve_fit, though it does not name any sibling explicitly.

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 by the OLS scope, which narrows it within a dense family of regression/statistics siblings (glm, mixed_lm, cox_regression, curve_fit), but there is no explicit when-to-use guidance or statement of what distinguishes it from those alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.