Skip to main content
Glama

solve_linear_program

Solve linear programming problems by maximizing or minimizing a linear objective function under linear constraints using Google OR-Tools.

Instructions

Solve a linear programming problem using Google OR-Tools. Maximizes or minimizes a linear objective function subject to linear constraints.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
objectiveYesLinear objective function coefficients
constraintsYesList of linear constraints
variable_boundsNoBounds for each variable [lower, upper]. Defaults to [0, Infinity]

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?

No annotations are provided, so the description carries the full behavioral burden. It states the operation is a solve but says nothing about optimality guarantees, solver status on infeasible/unbounded problems, what happens with malformed or empty constraints, or runtime characteristics.

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?

Two tight sentences that front-load the verb and resource, with the maximize/minimize capability summarized immediately after. No filler or restatement of the schema.

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?

There is no output schema, so the description should describe the return value (solution vector, objective value, status) but omits it entirely. For a nested, multi-parameter solver call whose result shape is non-obvious, this is a significant omission.

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 objective, constraints, bounds, and default semantics (including the Infinity convention). The description adds no parameter meaning beyond that, so the 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?

States a specific verb+resource ('Solve a linear programming problem') and the solver engine plus objective direction, so the purpose is unambiguous. It does not explicitly distinguish itself from solve_integer_program or solve_knapsack, which is the only thing keeping it from a 5.

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 guidance on when to use this versus the sibling solvers (e.g., continuous variables only vs integer/knapsack), nor any mention of model-size limits or infeasibility preconditions. The agent must infer the choice from the tool name alone.

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