Skip to main content
Glama
Han-maker-wp

lingo-mcp

by Han-maker-wp

lingo_solve

Solve LINGO optimization models inline or from a .lng/.lg4 file and return status, objective, variable values, and dual prices.

Instructions

Solve a LINGO optimization model and return the structured solution (status, objective value, variable values with reduced costs, row slacks/surplus with dual prices). Accepts LINGO 11 model source inline or a path to a .lng/.lg4 file. The model may be written in plain LINGO 11 syntax; MODEL: and END are added automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoLINGO model source, e.g. "MAX = 3*X1 + 4*X2;\nX1 + X2 <= 10;\nX2 <= 6;".
file_pathNoPath to an existing LINGO model file (.lng / .lg4) to solve instead of inline source.
timeout_msNoSolver timeout in milliseconds. Default 120000.
nonzero_onlyNoReport only nonzero variable values. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/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 it does substantial work: it discloses the exact solution payload (status, objective, variables with reduced costs, slack/surplus with duals) and the auto-wrapping behavior of MODEL:/END. It stops short of disclosing failure handling (infeasible/unbounded models) or the dependency on a LINGO engine/license being available.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the solve action, then input forms, then the wrapping caveat. Every sentence carries distinct information and the most decision-relevant fact leads.

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 4-param tool with no output schema and no annotations, the description is largely complete: it covers both input modes and compensates for the absent output schema by naming the returned fields. It omits error/solver-failure semantics, which are relevant for a solver tool.

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 100%, so the baseline is 3; the description exceeds it by clarifying that 'model' can be written without MODEL:/END wrappers, which is genuine parameter behavior the schema does not state. It adds nothing extra for timeout_ms or nonzero_only, which the schema already documents.

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 ('Solve a LINGO optimization model') and enumerates the output it produces. It is clearly distinguishable from siblings like lingo_run_commands and lingo_status, though it does not name any sibling explicitly to route between 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 agent can infer this is the tool to solve a model, and the two input forms (inline source vs .lng/.lg4 path) are noted. There is no explicit when-to-use/when-not guidance or comparison to lingo_run_commands, which an agent might confuse for a way to execute a model.

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