Skip to main content
Glama

linear_program

Minimize a linear objective under inequality/equality constraints and optional variable bounds; negate coefficients to maximize.

Instructions

Minimize c @ x subject to linear inequality/equality constraints.

``fun`` is the minimum objective value; negate ``c`` to maximize. Default
bounds are scipy's ``(0, None)`` (all variables non-negative).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cYes
a_eqNo
a_ubNo
b_eqNo
b_ubNo
boundsNo
methodNohighs

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/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, and it does add one genuinely useful behavioral fact: default bounds are scipy's (0, None), i.e. all variables non-negative, which clarifies what the schema's 'default: null' means. It still says nothing about infeasibility handling, solver failures, or the shape of the returned solution vector, so it is only partially transparent.

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?

Three tight sentences with the objective front-loaded, followed by the maximize trick and the default-bounds caveat. Every sentence carries distinct, non-redundant information.

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 7-parameter solver with 0% schema coverage, no annotations, and no output schema, the description is too thin. It never defines the constraint-matrix parameters that are the tool's core interface, nor what the return value's structure looks like beyond naming 'fun'.

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 coverage is 0% across 7 parameters, so the description must compensate and largely does not. It explains c (objective coefficients) and bounds (default non-negativity), and gestures at 'inequality/equality constraints', but never maps a_eq/a_ub/b_eq/b_ub or the method parameter to their names, leaving most parameters undocumented anywhere.

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 description states a precise verb and mathematical resource: 'Minimize c @ x subject to linear inequality/equality constraints,' which unambiguously identifies a continuous linear-program solver. It implicitly separates itself from integer_program and optimize_minimize via the linear formulation, but never names those alternatives, so sibling differentiation is left to inference.

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?

It offers a how-to tip ('negate c to maximize') but no when-to-use guidance, no indication of which sibling to prefer for integer or general nonlinear problems, and no prerequisites or exclusions. An agent must infer applicability entirely.

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