Skip to main content
Glama

Quadratic Equation Solver

solve_quadratic_equation
Read-onlyIdempotent

Use this when you need the solutions of a second-degree polynomial equation, or the vertex and discriminant of a parabola y = ax² + bx + c. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery.

Do not use this when the coefficient a is 0 (the equation is linear: x = −c / b), or you need roots of x^n = c for other powers (use nth-root). What it computes: Solves ax² + bx + c = 0 with the quadratic formula, reporting the discriminant, both roots (real, or complex conjugates written as strings), the vertex of the parabola and the sum and product of the roots. Inputs: a (number); b (number); c (number). Complete JSON argument examples: {"a":1,"b":-5,"c":6} | {"a":1,"b":2,"c":5} Outputs: discriminant, nature, root1, root2, roots, vertex_x, vertex_y, sum_of_roots, product_of_roots. Formula: Δ = b² − 4ac; x = (−b ± √Δ) / (2a); for Δ < 0: x = −b/(2a) ± i·√(−Δ)/(2|a|); vertex = (−b/(2a), c − b²/(4a)) Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/quadratic-equation with the same JSON input fields. Do not guess another /api/* path. Docs: https://tttkmbb.com/math/quadratic-equation.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYesCoefficient of x². Must not be 0.
bYesCoefficient of x.
cYesConstant term.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
linksNo
resultYes
requestYes
sourcesNo
successYes
versionNo
freshnessNo
timestampYes
next_actionsNo
service_versionYesDeployed Calcgrid implementation version used for the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / service_version
      Added value: +{
      +  "description": "Deployed Calcgrid implementation version used for the result.",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "success",
      -  "request",
      -  "result",
      -  "timestamp"
      -]New value: +[
      +  "success",
      +  "service_version",
      +  "request",
      +  "result",
      +  "timestamp"
      +]
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "a": 1,
      +    "b": -5,
      +    "c": 6
      +  },
      +  {
      +    "a": 1,
      +    "b": 2,
      +    "c": 5
      +  }
      +]
  3. Added
  4. Removed
  5. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already mark the operation read-only, idempotent, and non-destructive. The description adds meaningful behavioral detail: it reports the discriminant, roots as real or complex-conjugate strings, vertex, and root sum/product, and gives the exact formulas used.

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 longer than average, but each section earns its place: usage conditions, computed outputs, formula, REST fallback, and docs link. It is well-structured and front-loaded with the primary use case.

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

Completeness5/5

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

The description is complete for an agent to select and invoke the tool correctly: it covers inputs, outputs, formulas, edge cases, and even a REST fallback. The presence of an output schema also means return values need no further explanation.

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?

The input schema already covers all parameters with 100% coverage, so the baseline is 3. The description mostly repeats the parameter names and types, but the formula and examples reinforce the roles of a, b, and c without adding much beyond the schema.

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 states a specific verb and resource: solving a second-degree polynomial and producing the vertex/discriminant. It distinguishes itself from nth-root and linear-equation cases, and its scope is clear against the many sibling calculator tools.

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

Usage Guidelines5/5

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

It explicitly says when to use the tool, when not to use it (a = 0), and names the alternative (nth-root). This leaves no ambiguity about tool selection.

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.

Resources