Skip to main content
Glama
eng-toolkit

eng-toolkit

by Lin830326

Optimize Root

optimize_root

Finds scalar roots and solves square nonlinear systems via bisection, Newton, secant, damped Newton, or LM, with bounds, multistart, and residual certificates for engineering calculations.

Instructions

Solve scalar roots by bisection, Newton or secant and square systems by damped Newton/LM. Up to 12 variables and 64 starts; residual certificates required. Grammar: numbers, names, + - * / ^ (**), parentheses, whitelisted math calls; no comparisons inside expressions. Variables are plain numbers in the units you choose; the tool does not track units inside expressions.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "optimize_root"
  }
}

Input Schema

NameRequiredDescriptionDefault
scanNoScalar sign-change scan intervals, e.g. 100; 0 disables, 2..2000 needs bracket.
seedNoDeterministic random seed, e.g. 0; integer 0..4294967295, echoed in the result.
boundsNoVariable JSON bound pairs in initial order, e.g. '[[0,2]]'; null is unbounded.
methodNoRoot algorithm: auto, bisection, newton or secant, e.g. 'auto'; systems use damped Newton.auto
bracketNoOptional scalar JSON interval [lower,upper], e.g. '[0,2]'.
initialNoInitial variable records, e.g. 'x=1' or 'x=1;y=2'; at most 12 names.
toleranceNoDimensionless convergence tolerance, e.g. 1e-7; supported 1e-12..0.01.
expressionNoResidual expression, or semicolon-separated square-system residuals, e.g. 'x^2-2'.
multistartNoSeeded initial-point count, e.g. 8; 1..64, finite bounds recommended.
time_limitNoWall-clock budget with time units, e.g. '10 s'; supported 0.001..60 s, shared by all solver stages.10 s
max_iterationsNoIteration cap per local root solve, e.g. 500; 1..2000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does a good job: it discloses the 12-variable and 64-start caps, that residual certificates are required, that the seed is deterministic and echoed back, and the expression grammar including the ban on comparisons. It stops short of describing what the result looks like on non-convergence or exhaustion of the time budget.

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?

Three dense sentences, front-loaded with the capability and then the hard constraints; almost nothing is filler. It is packed tightly enough that the grammar and unit caveats run together, but no sentence is wasted.

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

Completeness3/5

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

For an 11-parameter numerical solver with no annotations and no output schema, the definition covers inputs and limits well but leaves the result contract thin — 'residual certificates required' is never unpacked, and there is no indication of what is returned (roots, residuals, convergence flags). An agent knows how to call it but not fully what to expect back.

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 already 100%, so the baseline is 3; the description earns above that by adding rules the schema does not state, notably the expression grammar (allowed operators, math-call whitelist, no comparisons) and the note that variables carry no unit tracking. These constraints materially change how `expression` and `initial` should be populated.

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?

The description opens with a specific verb and resource — 'Solve scalar roots by bisection, Newton or secant and square systems by damped Newton/LM' — which is far more precise than the title 'Optimize Root'. It implicitly separates root-finding from the optimization siblings (optimize_minimize, optimize_fit) by naming root algorithms, but never explicitly contrasts itself with them.

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: the solver types and the 'up to 12 variables and 64 starts' limit signal when the tool applies. There is no explicit statement of when to prefer this over optimize_minimize or optimize_fit, nor any when-not guidance, so an agent must infer the boundary from the algorithm names.

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

Deploy Server

Other Tools