Skip to main content
Glama

util_linear_program

Read-only

Linear / integer program solver — Solve a linear program offline (two-phase simplex): objective= linear expression like 3x+5y, constraints= separated by ; using <=, >= or = (variables allowed on both sides), sense=max|min (default max). Variables are >= 0 unless listed in free=. integer=true (or integer=x,y) runs branch-and-bound for integer/binary (add x<=1) problems. Returns OPTIMAL/INFEASIBLE/UNBOUNDED, objective value, variable values, per-constraint slack, binding constraints and shadow prices. Up to 60 variables and 150 constraints. Use for production mix, diet/blending, budget allocation, knapsack, staffing. Price: $0.003 USDC (Base, via x402).

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>",
      "constraints": "<constraints>"
    },
    "name": "util_linear_program"
  }
}

Input Schema

NameRequiredDescriptionDefault
objectiveYes3x+5y
constraintsYesx<=4;2y<=12;3x+2y<=18

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the description does not need to explain the safety profile. It does add genuinely useful non-annotation context: the solving algorithm, the full return payload (status string, objective value, variable values, slack, binding constraints, shadow prices), hard limits, and even the $0.003 USDC x402 price. However, it never states how the paid call is authenticated or what happens if payment fails, which is the one behavioral element an agent still needs.

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?

One dense, front-loaded block that leads with what the tool is and ends with cost; every clause carries information (syntax, defaults, return shape, limits). Slightly overstuffed with parenthetical asides, but nothing is padded or redundant.

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

Completeness3/5

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

Covers input syntax, output statuses and fields, size limits and pricing, which is strong for a no-output-schema tool. The completeness is undercut by the mismatch between the described 'sense'/'free'/'integer' options and the two-parameter schema, and by the absent payment/auth mechanics.

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

Parameters4/5

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

Schema coverage is 100 percent but the schema descriptions are bare examples ('3x+5y', 'x<=4;2y<=12;3x+2y<=18'), so the description adds real value by specifying delimiter (';'), allowed operators (<=, >=, =), variables-on-both-sides, and non-negativity default. It does, however, document 'sense', 'free' and 'integer' as if they were inputs when they are absent from the schema, which could send an agent looking for parameters that do not exist.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Solve a linear program offline (two-phase simplex)') and names the exact problem class it handles, so it is immediately distinguishable from sibling math tools like util_matrix or util_calc.

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?

Gives concrete use cases ('production mix, diet/blending, budget allocation, knapsack, staffing') that tell the agent when this tool applies, plus an implicit boundary via the 60-variable/150-constraint limit. It does not state when NOT to use it or name an alternative for simpler arithmetic, which is the only gap.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources