Skip to main content
Glama

integer_program

Solve mixed-integer linear programs by minimizing c @ x with optional equality/inequality constraints, bounds, and integrality settings.

Instructions

Minimize c @ x with scipy.optimize.milp (mixed-integer linear programming).

``integrality`` uses 1 for integer and 0 for continuous variables and
defaults to all-integer. ``fun`` is the minimum objective value; negate
``c`` to maximize. Default bounds are ``0 <= x <= inf``.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cYes
a_eqNo
a_ubNo
b_eqNo
b_ubNo
boundsNo
methodNohighs
integralityNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/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. It usefully discloses default bounds (0 <= x <= inf), the all-integer default for integrality, and that fun is the minimum objective, but says nothing about infeasibility behavior, return shape beyond fun, or solver/method characteristics.

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 operation and kept to three tight sentences with no padding; the integrality and negation notes earn their place. Slightly under-specified rather than verbose, so conciseness is not the weak point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter, 0%-coverage, no-output-schema tool, the description is incomplete: the constraint matrix/vector parameters that define the actual problem are never explained, so an agent cannot confidently formulate a call from the description alone.

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

Parameters2/5

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

Schema description coverage is 0% across 8 parameters, so the description must compensate. It explains c (objective), integrality, and bounds, but the five constraint/method parameters (a_eq, a_ub, b_eq, b_ub, method) are left entirely undocumented in both schema and description, which is a real gap for a MILP tool.

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+resource (minimize c @ x via scipy milp) and names the problem class (mixed-integer linear programming), which implicitly separates it from the sibling linear_program. It never explicitly routes the agent to linear_program for all-continuous problems, so sibling differentiation is only implicit.

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?

There is no explicit when-to-use guidance versus linear_program or optimize_minimize, only the implication carried by 'mixed-integer'. It does offer a useful usage note ('negate c to maximize') and integrality semantics, but nothing on exclusions or which sibling to pick.

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