Lingshu Solver

v1.0.23
io.github.genesis-plan/lingshu-solver Checked 4 days ago Published 1 month ago

Deterministic MCP solver for real equation systems (<=6 vars), Krawczyk-certified.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

solve

Deterministic (non-LLM) solver for systems of real equations. Same input always returns the identical result — no hallucination, no randomness. Supports algebraic equations and common transcendentals (sin/cos/tan/log/exp/sqrt/abs), max 6 variables, no initial guess needed. READ THE trust BLOCK: it tells you, per result, whether the value is safe to use directly or must be verified first. Pass domain explicitly for exp/sin or large ranges, else truncated may be true. Not for symbolic derivation, ODEs, or integer constraints. trust.completeness.status: complete = found count equals a proven bo…

ParameterTypeDescription
equations *arrayEquation strings with "=", e.g. ["x^2 + y^2 = 25", "x + y = 7"]. Operators: + - * / ^ sqrt log sin cos tan exp abs. In-text domain constraints allowed: "x in [-30,30]". 1 to 64 equations, at least as…
domainobjectSearch domain per variable, e.g. {"x":[-30,30],"y":[-30,30]}. Defaults to +/-1e6 each. Set it for exp/sin/large ranges: a too-wide default domain may fail to prune and set truncated=true.
fastModebooleanSkip the expensive certification layers. Faster but tiers degrade to candidate. Default false.
nnumberPagination offset for the solution list. Omit for the first page. When a response carries nextOffset, pass it back as n to get the remaining solutions — the response shows at most 2 at a time.
optionsobjectAdvanced: {budget, maxDepth}. Raise budget when truncated=true and you need completeness.
variablesarrayVariable names. Omit to auto-detect from the equation text in order of appearance. Max 6; more than 6 is rejected, not approximated.

give_feedback

Report a problem to the operator when solve hits a dead end, returns an error, or produces something you believe is wrong. The text is written to a local log only and is never transmitted anywhere else.

ParameterTypeDescription
message *stringWhat you hit, what you expected, and what you actually got.
contextstringOptional context: the triggering scenario or input characteristics.

poly_roots

All real roots of a polynomial, each individually Krawczyk-certified with a strict error box. Coefficients are highest degree first: [1,-2,-5,6] means x^3-2x^2-5x+6. Use it instead of letting a language model estimate roots. Complex roots are not returned (real only). At most 2 roots are listed per call; when more exist the response carries nextOffset and trust.moreAvailable — call again with n=nextOffset to get the rest, otherwise you will report an incomplete root set.

ParameterTypeDescription
coefficients *arrayHighest degree first, e.g. [1,-2,-5,6] means x^3-2x^2-5x+6.
nnumberPagination offset for the solution list. Omit for the first page. When a response carries nextOffset, pass it back as n to get the remaining solutions — the response shows at most 2 at a time.
tolerancenumberRoot-decision tolerance (optional; internal precision by default).

verify

Check whether a claimed answer is actually correct — call this on any number you computed yourself before passing it downstream. verdict=verified means it is a certified real root; verdict=refuted_or_unverified means it is NOT, and nearestCertifiedRoot then carries the correct value so you can self-correct in the same turn. Deterministic and reproducible.

ParameterTypeDescription
candidate *The claimed answer: a number (single variable, defaults to x), {variable:value} pairs, or an array in variables order.
equation *stringA single equation with "=", e.g. "x^2 = 4".
tolerancenumberSearch radius around the candidate (default 1e-3).
variablesarrayRequired for multi-variable or array candidates, e.g. ["x","y"].

geometry

Deterministic 1D/2D/3D geometry: distances, intersections, areas, volumes, angles, convex hull, point-in-polygon, rotations. Closed-form (not iterative), exact up to floating-point rounding, identical output for identical input. Use it instead of doing geometry yourself. Pass {op, ...args} with op one of: 1D: dist1,midpoint1,divide_point,divide_ratio,harmonic_conjugate,interval_length,interval_midpoint,interval_intersect,interval_union,interval_hull,interval_overlap_length,interval_contains,point_between | 2D: dist2,midpoint2,lerp2,line_from_points,point_line_distance,point_segment_distance,pr…

ParameterTypeDescription
op *stringGeometry operation name. See the tool description for the full list, or send an unknown value to receive the catalog with signatures.