Skip to main content
Glama

Cubic Equation Solver

calculator_cubic_equation
Read-only

Solve ax³ + bx² + cx + d = 0 for real/complex roots.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "calculator_cubic_equation"
  }
}

Input Schema

NameRequiredDescriptionDefault
aNoCoefficient a (≠0).
bNoCoefficient b.
cNoCoefficient c.
dNoCoefficient d.
equationNoCubic equation string.
variableNoVariable name.

Output Schema

NameRequiredDescriptionDefault
rootsNo
expressionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered and the description only needs to add behavior. It does add that complex roots are returned, which is useful, but it omits the hard constraint that a must be non-zero (a cubic degenerates otherwise) and doesn't clarify how the two input modes interact or what happens on invalid input.

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?

A single front-loaded sentence with zero filler — the equation form comes first and the output scope (real/complex roots) follows. It is efficient, though its brevity arguably comes at the cost of the usage and mode information noted elsewhere rather than through tight editing of otherwise redundant prose.

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 exists, so return values need no explanation, and the formula covers the math. However, for a six-parameter tool where every parameter is optional and two distinct input paths exist, the description leaves an agent unsure whether to pass coefficients, an equation string, or both — a meaningful gap for correct invocation.

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 the formula in the description maps the letters a, b, c, d to their roles, so the schema plus formula is largely self-sufficient. The baseline 3 applies: the description adds the polynomial form but no detail on the equation-string syntax or the variable parameter beyond what the schema examples already show.

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 (solve) and a specific resource (cubic equation ax³+bx²+cx+d=0), including the exact form being solved and that roots may be real or complex. That is well beyond tautology, but it never differentiates itself from close siblings such as calculator_quadratic_equation, calculator_polynomial, calculator_root_finder, or calculator_numerical_solve.

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?

There is no guidance on when to choose this over calculator_quadratic_equation (degree 2) or calculator_root_finder/numerical_solve (general or numeric solving). Equally important, nothing explains the two mutually exclusive input modes the schema exposes — coefficient mode (a,b,c,d) versus free-form equation string plus variable — or which takes precedence when both are supplied.

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.