Skip to main content
Glama
eng-toolkit

eng-toolkit

by Lin830326

Optimize Minimize

optimize_minimize

Minimize or maximize objective expressions over bounded or constrained variables using BFGS, Nelder-Mead, differential evolution, and multistart numerical optimization.

Instructions

Min/max by BFGS/Armijo, projected BFGS, safeguarded augmented Lagrangian, Nelder-Mead, seeded DE or multistart; numerical KKT certificate with second-order probes, no global guarantee. Caps: 16 names, 20 constraints, 200k evaluations/100m node operations. 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_minimize"
  }
}

Input Schema

NameRequiredDescriptionDefault
seedNoDeterministic random seed, e.g. 0; integer 0..4294967295, echoed in the result.
boundsNoJSON [lower,upper] pairs in initial-name order, e.g. '[[0,5]]'; null is unbounded; '' omits all bounds.
methodNoauto, bfgs, nelder_mead, differential_evolution or multistart; auto uses smoothness, bounds and constraints.auto
startsNoSeeded starts for multistart, e.g. 16; integer 1..64; other methods require default 16.
initialNoInitial variables as name=number records, e.g. 'x=0;y=1'; semicolon/newline separated, <=16 names.
maximizeNoTrue maximizes the supplied objective; false minimizes it. Returned objective keeps its original sign.
toleranceNoDimensionless convergence tolerance, e.g. 1e-7; supported 1e-12..0.01.
expressionNoObjective formula, e.g. '(x-1)^2'; required, <=2000 characters; minimize unless maximize is true.
parametersNoFixed dimensionless name=number records, e.g. 'a=2'; '' omits; total variable and parameter names <=16.
populationNoDE population size, e.g. 40; integer 5..200; used only by differential_evolution.
time_limitNoWall-clock budget with time units, e.g. '10 s'; supported 0.001..60 s, shared by all solver stages.10 s
constraintsNoUp to 20 expression <= 0, >= 0 or == 0 records, e.g. 'x+y-1<=0'; semicolon/newline separated; '' omits.
generationsNoDE generations before local polishing, e.g. 200; integer 1..1000; only differential_evolution uses it.
max_iterationsNoMaximum local iterations across multiplier stages, e.g. 1000; integer 1..5000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

B3.3/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 and does disclose meaningful behavior: absence of a global guarantee, a numerical KKT certificate with second-order probes, hard caps (16 names, 20 constraints, 200k evaluations/100m node operations), and the fact that units are not tracked inside expressions. What it omits is the shape of the result, how failure/infeasibility is reported, and any note on determinism despite the seed parameter. Solid but incomplete for a zero-annotation mutation-adjacent tool.

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?

The verb and method list are front-loaded and every clause carries information — caps, grammar, unit caveat — with no filler. The semicolon-chained, jargon-heavy style makes it dense to parse, which keeps it from a 5, but nothing is redundant.

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 a 14-parameter tool with no annotations and no output schema, the description should also say what comes back and how to read the KKT certificate it advertises. It covers limits and expression grammar well, but leaves return values, error behavior, and method trade-offs implicit. Adequate, not complete.

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 baseline is 3; the description earns above that by adding grammar semantics that the schema does not state: allowed operators including '^' and '**', parentheses, whitelisted math calls, and the restriction 'no comparisons inside expressions'. The statement that variables are plain numbers in caller-chosen units, with no unit tracking, is genuine meaning beyond the schema text.

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 pair and resource: 'Min/max by BFGS/Armijo, projected BFGS, safeguarded augmented Lagrangian, Nelder-Mead, seeded DE or multistart'. An agent immediately knows this is constrained numerical optimization over an expression. It does not, however, distinguish itself from siblings such as optimize_linprog, optimize_root or optimize_fit, so the agent gets no help deciding which optimizer family applies.

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

Usage Guidelines2/5

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

The description says nothing about when to choose this tool over the other optimize_* siblings, nor about prerequisites or when-not conditions. The only near-guidance is 'no global guarantee', which warns about result quality but does not route the agent to alternatives. The method-selection hint ('auto uses smoothness, bounds and constraints') lives in the schema, not the description.

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