Skip to main content
Glama
bob-cplex-mcp

bob-cplex-mcp

by doubladeeeer

Solve Integer Program Tool

solve_integer_program_tool

Solve integer and mixed-integer optimization problems—such as facility location, project selection, and crew scheduling—by defining objectives, variables, and constraints for CPLEX-backed solving.

Instructions

Solve an integer or mixed-integer programming problem using PuLP.

This tool solves optimization problems where some or all variables must take integer values, which is useful for discrete decision problems.

Use cases:

  • Facility location: Decide where to build warehouses or service centers

  • Project selection: Choose which projects to fund (binary decisions)

  • Crew scheduling: Assign integer numbers of staff to shifts

  • Network design: Design networks with discrete components

  • Cutting stock: Minimize waste when cutting materials

  • Capital budgeting: Select investments when partial investments aren't allowed

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "objective": "<objective>",
      "variables": "<variables>",
      "constraints": "<constraints>"
    },
    "name": "solve_integer_program_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
solverNoSolver to use ("CBC", "GLPK", "GUROBI", "CPLEX"); the requested solver must be available or the call fails - no silent fallbackCPLEX
objectiveYesObjective function with 'sense' and 'coefficients'
variablesYesVariable definitions with types "continuous", "integer", or "binary"
constraintsYesList of linear constraints
time_limit_secondsNoMaximum time to spend solving (optional)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden, and it discloses almost no runtime behavior: nothing about infeasibility, unboundedness, non-zero exit, or whether the call has side effects. The one genuine behavioral fact (the requested solver must be installed or the call fails hard, no silent fallback) lives in the schema's solver description rather than here. An output schema exists, so return values need not be re-explained.

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?

Front-loaded with the core purpose in one sentence, followed by a scoping sentence and a scannable use-case list. The six bullets are somewhat longer than strictly necessary for an agent to select the tool, but each is compact and non-redundant.

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 five-parameter solving tool with nested objects and a declared output schema, the description covers what the tool does and when it applies, which is most of what an agent needs. The remaining gap is failure-mode disclosure (infeasible/unbounded models, solver unavailability), which the description leaves entirely to the schema.

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 description coverage is 100%, so the schema already documents solver, objective, variables, constraints, and time_limit_seconds. The description adds no extra meaning beyond the schema — for instance, it never clarifies the shape of objective/constraints or how binary vs integer types affect the model. Baseline 3 applies.

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 first sentence gives a specific verb and resource ("Solve an integer or mixed-integer programming problem using PuLP") and the follow-up clarifies the defining constraint that variables must be integral. This implicitly distinguishes it from the linear-programming sibling, though the sibling is never named.

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

Usage Guidelines4/5

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

Clear context is given for when integer modeling is the right choice ("some or all variables must take integer values, which is useful for discrete decision problems") plus six concrete domain examples. It stops short of explicitly excluding cases or naming solve_linear_program_tool as the alternative for fully continuous models.

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