Skip to main content
Glama

stats_polynomial-regression

Read-onlyIdempotent

Fit polynomial regression models of specified degree, returning coefficients, R², fitted values, and residuals.

Instructions

Polynomial regression of degree n with goodness-of-fit metrics.

Use when fitting a polynomial of degree n to data. Provide x, y arrays, and degree. Returns: coefficients, R², fitted values, and residuals.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesIndependent variable array
yYesDependent variable array
degreeNoPolynomial degree (1=linear, 2=quadratic, etc.)
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds value by detailing the return values (coefficients, R², fitted values, residuals), providing behavioral context beyond the annotations.

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 sentences with no wasted words. The first sentence states the purpose, and the second gives usage and outputs. It is front-loaded and efficient.

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?

The description adequately covers inputs (from schema) and outputs (explicitly listed). Complexity is moderate, and the description is sufficient for an agent to understand usage. No mention of edge cases or constraints, but not required for a standard regression 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 coverage is 100% with all parameters described. The description merely restates 'Provide x, y arrays, and degree' without adding new constraints or usage details. Baseline 3 is appropriate.

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 clearly states the tool performs polynomial regression of degree n with goodness-of-fit metrics. It uses specific verbs ('fitting a polynomial') and specifies the resource (x, y arrays) and outputs (coefficients, R², fitted values, residuals). It is distinct from sibling tools like stats_linear-regression.

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?

The description gives a clear usage context: 'Use when fitting a polynomial of degree n to data.' It does not explicitly state when not to use or name alternatives, but the context is sufficient for basic guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/QuantOracledev/quantoracle'

If you have feedback or need assistance with the MCP directory API, please join our Discord server