Skip to main content
Glama
Chetto983

Mathematical Calculator MCP Server

by Chetto983

solve_equation

Solve algebraic equations for x and return all solutions. Enter one equation string with an equals sign, such as x**2 - 5*x + 6 = 0, for SymPy-supported polynomial or trigonometric results.

Instructions

Solves an algebraic equation for x and returns all solutions.

The equation must contain exactly one equality sign (=) and use a variable x. Can solve polynomial, trigonometric, and other equations supported by SymPy.

Args: equation: The equation to solve as a string. Format: ' = ' Examples: "x**2 - 5x + 6 = 0", "sin(x) = 0.5", "2x + 3 = 7"

Returns: On success: {"solutions": } On error: {"error": }

Examples: >>> solve_equation("x**2 - 5x + 6 = 0") {'solutions': '[2, 3]'} >>> solve_equation("2x + 3 = 7") {'solutions': '[2]'} >>> solve_equation("x = 0") {'solutions': '[0]'}

Notes: - Use 'x' as the variable (e.g., x2, not x^2) - Multiplication must be explicitly indicated with * (e.g., 2*x, not 2x) - Powers can be represented with ** or ^ (e.g., x2 or x^2)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
equationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does so well: it discloses the return shape ({"solutions": [...]}) and the error shape ({"error": ...}), and pins down input-format rules (explicit '*', 'x' variable, '**' or '^' for powers). It does not mention edge cases such as no-solution or infinite-solution equations, which would complete the picture.

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?

Well front-loaded with purpose first, then args/returns/examples/notes. The structure is clean and each section is useful, though the third example ("x = 0") is near-trivial and some examples restate the format rules already given in Notes.

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?

For a one-parameter computational tool with no annotations and no output schema, the description supplies everything needed: input format, output format, error format, and worked examples. An agent can call it correctly without opening the schema.

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

Parameters5/5

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

Schema coverage is 0%, so the description must define the single parameter, and it does thoroughly: the string format, three concrete examples, and the syntax gotchas (x vs x^2, '2*x' not '2x'). This is exactly the compensation a 0%-coverage schema requires.

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 (solves) and resource (algebraic equation), plus the output contract (returns all solutions). It is clearly distinguishable from compute siblings like differentiate, integrate, and factorize, and the 'for x' scope narrows it further.

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

Usage Guidelines3/5

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

It gives real usage constraints (exactly one '=', must use variable x, SymPy-supported equation classes), which implicitly tells the agent when the tool applies. However, it never names an alternative or says when NOT to use it versus siblings like calculate or expand, so routing is left to inference.

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