Skip to main content
Glama
AbderY
by AbderY

solve_quadratic

Computes the discriminant and real or complex roots for a quadratic equation ax^2 + bx + c = 0; requires a != 0.

Instructions

Solve a*x^2 + b*x + c = 0 and return its roots.

Reports the discriminant and the (real or complex) roots. Requires a != 0; use a linear solve otherwise.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes
cYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses the domain precondition (a != 0), the outputs (discriminant plus real or complex roots), and implicitly the complex-result behavior. It does not describe error/exception behavior or numeric precision limits, but covers the essentials.

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 short sentences, front-loaded with the core purpose and the equation, followed by behavior. No filler sentences.

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 tool is simple (3 scalar params, single math operation) and an output schema exists, so return formatting need not be explained. Precondition, domain, and result shape are all covered; nothing an agent needs to call it correctly is missing.

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

Parameters4/5

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

Schema coverage is 0% and the parameters are bare 'A/B/C' titles, so the description must compensate. The equation form ``a*x^2 + b*x + c = 0`` maps each parameter to its role as a coefficient, which is meaningful, though it never spells out the mapping in prose or notes that all three are required.

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?

States a specific verb (solve) and the exact resource (``a*x^2 + b*x + c = 0``), plus what it returns (discriminant and roots). This clearly separates it from siblings like solve_linear_system and solve_symbolic_equation.

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?

Explicitly states the precondition ``a != 0`` and redirects to a linear solve otherwise, which is real when-not guidance. It does not name the exact sibling (solve_linear_system) it is pointing to, so routing requires a small inference.

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