Skip to main content
Glama

solve_integer_program

Solve integer programming and mixed-integer programming problems with linear objectives and constraints to find optimal solutions.

Instructions

Solve an integer programming (IP) or mixed-integer programming (MIP) problem using Google OR-Tools. Variables can be constrained to integer values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
objectiveYesLinear objective function coefficients
constraintsYesList of linear constraints
variable_boundsNoBounds for each variable [lower, upper]. Defaults to [0, Infinity]
integer_variablesNoIndices of variables that must be integers (0-indexed). If omitted, all variables are integers.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It discloses the engine (OR-Tools) and that variables can be integer-constrained, but says nothing about optimality guarantees, time limits, infeasibility/unbounded handling, or return format — all material for a solver invocation.

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?

Two short sentences, front-loaded with the core action and engine. Minor redundancy in restating 'integer values' after already saying 'integer programming', but no wasted prose.

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 a 4-parameter solver with nested objects, no annotations, and no output schema, the description is thin. It omits return shape (solution values, status, objective value) and edge-case behavior, leaving the agent without information it cannot derive from the input 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 nested objective, constraints, variable_bounds, and integer_variables parameters are already well documented in the schema. The description adds no parameter syntax or default details beyond it, so the baseline of 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?

States a specific verb (solve) and resource (integer/mixed-integer programming problem) and names the underlying engine (Google OR-Tools). It is clear what the tool does, though it does not explicitly distinguish itself from the sibling solvers solve_linear_program and solve_knapsack.

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?

No when-to-use guidance is given. The phrase 'integer or mixed-integer' implicitly separates it from solve_linear_program, but the agent is never told to prefer this tool over that sibling, nor when knapsack-style problems should route elsewhere.

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