Skip to main content
Glama
k-ming
by k-ming

linear_regression

Fit a simple linear regression model to compute slope and intercept from paired x and y data points.

Instructions

拟合简单线性回归 y = slope * x + intercept。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYes
yYes
Behavior2/5

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

With no annotations, the description must carry the full burden, but it only states the formula. It does not disclose the return type (e.g., slope and intercept, R-squared), error handling, or constraints like equal-length arrays. This minimal disclosure leaves significant uncertainty about tool behavior.

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?

The description is a single concise sentence that delivers the core purpose with no superfluous words. It is front-loaded with the key information. However, adding structured details about parameters or output would improve completeness without breaking conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations, output schema, and zero schema description coverage, the description is insufficient. It only provides the basic purpose, leaving out critical information about expected inputs (e.g., data length, format) and outputs (e.g., what values are returned). A more complete description is needed for this simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, and the description adds only the contextual hint that y = slope * x + intercept, which implies x and y are numeric arrays. However, it does not specify that they must be of equal length, the order of elements, or any formatting requirements. The description fails to compensate for the missing schema descriptions.

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 fits a simple linear regression with the explicit formula y = slope * x + intercept. It specifies the verb '拟合' (fit) and the resource '线性回归' (linear regression), and it distinguishes itself from sibling tools like correlation or t_test.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. It does not mention that it is limited to simple linear regression, nor does it exclude multiple regression or suggest other tools for more complex modeling. There is no context about prerequisites or data assumptions.

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/k-ming/Scientific-computing-MCP'

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