Skip to main content
Glama

Optimization Solver (LP / MIP Scheduling) MCP

Optimization Solver (LP / MIP, scheduling, allocation)

optimization_solver
Read-only

Find the best plan within limits and explain it. Templates (problem_type): production_mix (products with profit, min/max and use of each resource + resources with available amounts); blend (ingredients with cost and nutrient columns + requirements with min/max, batch_size); transportation (sources with supply, destinations with demand, costs per route); schedule (periods with staff required + shifts or shift_length; or staff + shifts for a roster; or jobs + machines); allocation (projects with value and cost + budget, groups, dependencies); custom (objective + constraints as text such as '3x + 2y <= 18', or MPS). Returns the optimal plan, decision cards, shadow prices with valid ranges (value of one more unit of each limit), reduced costs and price ranges, proven bounds for whole-number plans, conflicting limits with the smallest fix when no plan exists, and the gain over a current_plan. Uses simplex, branch and bound (MIP) and the transportation simplex. Not for forecasting demand, nonlinear or stochastic models, or vehicle routing with time windows. Up to ~3,000 variables; larger: optimization_solver_get_engine.

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": "optimization_solver"
  }
}

Input Schema

NameRequiredDescriptionDefault
mpsNocustom: an MPS model as text.
jobsNojobs on machines: name, duration (or a column per machine), allowed machines, due.
basisNo
costsNotransportation: rows of source, destination, cost (optional capacity), or one row per source with a column per destination, or {source: {destination: cost}}.
staffNoroster: name, cost_per_shift (or hourly_rate), max_shifts, min_shifts, max_hours, unavailable (shifts or days), skills.
usageNoOptional long form: product, resource, amount per unit.
budgetNo
cyclicNo
groupsNoMutually exclusive groups: name, members, max, min.
shiftsNoschedule: shift name, cost, periods covered (or start + length); for rosters: name, day, required, skill, hours.
budgetsNoSeveral budgets: name, available.
mip_gapNo
periodsNoschedule: period / day name, staff required.
sourcesNotransportation: name, supply.
currencyNoINR
machinesNoMachine names (or rows with name).
productsNoproduction_mix: name, profit (or price and cost), min, max / demand, and per-unit use of each resource as columns named like the resources (or a 'uses' object).
projectsNoallocation: name, value, cost (or a column per budget), must, exclude, group, requires, divisible.
max_nodesNo
objectiveNocustom: 'maximize 3x + 5y' or {sense, terms}.
resourcesNoproduction_mix: name, available (capacity), unit.
variablesNocustom: name, lower, upper, type (continuous / integer / binary), objective.
batch_sizeNoblend: total amount per batch; requirements then mean per unit of blend (shares). Omit for totals (diet).
max_listedNo
constraintsNoRules as text ('2x + 3y <= 10', '10 <= a + b <= 20', 'A >= 2 B') or {name, terms, sense, rhs}; also extra rules for the templates.
ingredientsNoblend: name, cost per unit, one column per nutrient / property, optional min / max amount, min_share / max_share.
whole_unitsNotrue, false or 'auto' (default).
current_planNoWhat is done today (name -> value, or shipment rows) to measure the gain.
destinationsNotransportation: name, demand.
problem_typeNoTemplate; detected from the inputs when omitted.
requirementsNoblend: nutrient / property, min, max (or target).
shift_lengthNoGenerate shifts of this many consecutive periods (e.g. 5 working days).
shortage_costNo
allow_shortageNo
allow_unfilledNo
currency_symbolNo
forbidden_pairsNoShift pairs one person may not both work (e.g. night then early).
unfilled_penaltyNo
one_shift_per_dayNo
time_limit_secondsNo

Output Schema

NameRequiredDescriptionDefault
planNo
alertsNo
statusYes1 = a plan was found, 0 = no plan (see decisions)
messageNo
metadataYes
solutionNo
decisionsYesPlain-language cards, priority order. Relay these first.
comparisonNo
assumptionsNo
infeasibilityNo
data_quality_reportNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already establish readOnly/non-destructive/closed-world, and the description adds real behavioral context beyond them: the algorithms used (simplex, branch and bound, transportation simplex), that infeasibility yields conflicting limits with the smallest fix, that integer models get proven bounds, and that a current_plan produces a gain comparison. It stops short of explaining how mip_gap or time_limit_seconds affect result quality (e.g., best-so-far on timeout), which is the main remaining transparency gap for a solver.

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 core action and the sibling routing are front-loaded, and the long template enumeration earns its space given 40 parameters and six distinct input families. It is dense but not padded; the only soft redundancy is restating the return contents (shadow prices, reduced costs, bounds) that the output schema also covers.

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 40-parameter tool with an output schema and safety annotations in place, the description supplies the missing pieces an agent needs: problem-type routing, size ceiling, exclusions, infeasibility diagnostics, and the current_plan comparison. Remaining gaps are solver-tuning parameters (mip_gap, max_nodes, time_limit_seconds) whose effect on result optimality is not described.

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 only 65% across 40 parameters, so the description carries real weight — and it does, mapping nearly every template parameter to its role (products with profit/min/max/per-unit resource use, ingredients with cost and nutrient columns, sources/destinations/costs, periods + shifts or shift_length, staff for rosters, projects with value/cost/dependencies, objective + constraints as text or MPS). Several undocumented parameters (basis, cyclic, mip_gap, time_limit_seconds, shortage_cost, max_listed, currency) are still left unexplained, so it doesn't fully close the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and outcome ("Find the best plan within limits and explain it") and then enumerates exactly which problem classes it covers (production_mix, blend, transportation, schedule, allocation, custom) with their input shapes. It explicitly separates itself from the sibling by naming the size threshold: "Up to ~3,000 variables; larger: optimization_solver_get_engine."

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

Usage Guidelines5/5

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

Includes explicit when-not guidance: "Not for forecasting demand, nonlinear or stochastic models, or vehicle routing with time windows," plus the size-based handoff to optimization_solver_get_engine. The template list also functions as a routing table telling the agent which input family to populate for each problem type.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources