Skip to main content
Glama
eng-toolkit

eng-toolkit

by Lin830326

Optimize Linprog

optimize_linprog

Solve linear and mixed-integer programming problems from JSON coefficients via simplex and branch-and-bound, returning checked primal/dual diagnostics and basis RHS ranges.

Instructions

LP accepts JSON coefficients: two-phase simplex with Bland pivots and integer branch and bound. Caps: 200 variables/rows, 30 integer indices, 10000 nodes. Returns checked primal/dual diagnostics and basis RHS ranges; ambiguous certificates refuse. 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_linprog"
  }
}

Input Schema

NameRequiredDescriptionDefault
cNoRequired objective coefficient JSON vector, e.g. '[1,2]'; 1..200 variables; '' refuses.
A_eqNoEquality matrix JSON, e.g. '[[1,1]]', for A_eq*x=b_eq; '[]' omits; <=200 total rows.[]
A_ubNoInequality matrix JSON, e.g. '[[1,2]]', for A_ub*x<=b_ub; '[]' omits; <=200 total rows.[]
b_eqNoEquality RHS JSON vector, e.g. '[2]'; '[]' omits; one value per A_eq row.[]
b_ubNoInequality RHS JSON vector, e.g. '[3]'; '[]' omits; one value per A_ub row.[]
boundsNoJSON [lower,upper] pairs, e.g. '[[0,5],[null,null]]'; null is unbounded; '' defaults to nonnegative.
integerNoJSON zero-based integer-variable indices, e.g. '[0,2]'; at most 30; '[]' uses continuous variables.[]
maximizeNoObjective direction, e.g. true maximizes c*x; false minimizes and is the default.
node_limitNoBranch and bound cap, e.g. 1000 nodes; integer 1..10000; cap exhaustion refuses.
time_limitNoWall-clock budget with time units, e.g. '10 s'; supported 0.001..60 s, shared by all solver stages.10 s

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, the description carries the full burden and does substantial work: it discloses the algorithm family, hard caps (200 variables/rows, 30 integer indices, 10000 nodes), the returned artifacts (primal/dual diagnostics, basis RHS ranges), and refusal semantics for ambiguous certificates and cap exhaustion. It stops short of describing output shape or how dual diagnostics are signed/normalized.

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 text is dense and front-loaded: algorithm, caps, return contract, then grammar and units. It is slightly telegraphic and the grammar sentence leaves the reader unsure where expressions are accepted, but no sentence is pure filler.

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?

For a 10-parameter solver with no output schema, the description covers methods, limits, failure modes, and the nature of the returned diagnostics. Remaining gaps are minor, such as how the time_limit interacts with node_limit or what a refusal response looks like.

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

Parameters3/5

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

Schema coverage is 100%, so the schema already documents every parameter including defaults, units, and example JSON, which sets the baseline at 3. The description adds real meaning beyond that with the expression grammar and the explicit note that variables carry no units, but it does not clarify how grammar expressions relate to the JSON vector 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?

The description names the resource (an LP) and its concrete method (two-phase simplex with Bland pivots, plus integer branch and bound), so an agent can tell this is a linear/integer program solver rather than a general minimizer. The verb is implicit ('LP accepts JSON coefficients') rather than stated as 'solve', and it never names a sibling to distinguish itself from optimize_minimize or optimize_fit.

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: LP formulation with c/A_eq/A_ub/bounds/integer signals when this tool applies, and the caps hint at problem size limits. There is no explicit statement of when to prefer optimize_minimize or optimize_doe, nor any when-not condition beyond refusal behaviors.

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