Skip to main content
Glama
Symbolic Algebra MCP Server

Symbolic Algebra MCP Server

solve_nonlinear_system

Solves systems of nonlinear equations for specified variables and returns the solution set as LaTeX, supporting complex, real, integer, or natural domains.

Instructions

Solves a system of nonlinear equations using SymPy's nonlinsolve.

Args:
    expr_keys: The keys of the expressions (previously introduced) forming the system.
    var_names: The names of the variables to solve for.
    domain: The domain to solve in (Domain.COMPLEX, Domain.REAL, etc.). Defaults to Domain.COMPLEX.

Returns:
    A LaTeX string representing the solution set. Returns an error message string if issues occur.

Input Schema

NameRequiredDescriptionDefault
domainNocomplex
expr_keysYes
var_namesYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does usefully disclose that the return is a LaTeX solution set and that failures come back as an error message string rather than an exception, but it says nothing about solving behavior such as solution completeness, multiplicity, or possible non-termination on hard systems.

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?

Front-loaded one-line purpose followed by compact Args/Returns blocks; every line carries information. Slightly verbose in restating the default already encoded in the schema, but nothing is wasted.

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

Completeness4/5

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

All three parameters are explained and the return behavior is described, which is more than needed since an output schema exists. The main gap is behavioral context for a solver with no annotations, such as what happens with underdetermined or inconsistent systems beyond a generic error string.

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 description coverage is 0%, so the description must compensate, and it does: expr_keys is clarified as keys of previously introduced expressions, var_names as the solve targets, and domain as the solution domain with its default. It adds real meaning beyond the bare schema for all three parameters.

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 and resource ('Solves a system of nonlinear equations using SymPy's nonlinsolve'), and the word 'nonlinear' implicitly separates it from the sibling solve_linear_system. It does not name that sibling explicitly, so differentiation is inferable rather than stated.

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?

Usage is only implied: an agent can infer it should be used for nonlinear systems, but the description never says when to prefer it over solve_algebraically or solve_linear_system, nor any prerequisites. No when-not-to-use guidance is present.

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