Skip to main content
Glama
Sharmarajnish

Constrained Optimization MCP Server

solve_linear_programming

Solve linear and mixed-integer linear programming problems with linear constraints using HiGHS. Define objective, variables, and constraints to minimize or maximize.

Instructions

Solve linear and mixed-integer programming problems using HiGHS.

This tool is ideal for linear programming, mixed-integer linear programming,
and large-scale optimization problems with linear constraints.

Args:
    sense: Optimization sense, either "minimize" or "maximize"
    objective_coeffs: List of objective function coefficients
    variables: List of variable definitions with optional bounds and types
    constraint_matrix: 2D list representing the constraint matrix (dense format)
    constraint_senses: List of constraint directions ("<=", ">=", "=")
    rhs_values: List of right-hand side values for constraints
    options: Optional solver options dictionary
    description: Optional problem description
    
Returns:
    Solution results including variable values and objective value
    
Example:
    sense = "minimize"
    objective_coeffs = [1.0, 2.0, 3.0]
    variables = [
        {"name": "x1", "lb": 0, "ub": 10, "type": "cont"},
        {"name": "x2", "lb": 0, "ub": None, "type": "int"},
        {"name": "x3", "lb": 0, "ub": 1, "type": "bin"}
    ]
    constraint_matrix = [[1, 1, 0], [0, 1, 1]]
    constraint_senses = ["<=", ">="]
    rhs_values = [5, 3]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
senseYes
objective_coeffsYes
variablesYes
constraint_matrixYes
constraint_sensesYes
rhs_valuesYes
optionsNo
descriptionNo
Behavior3/5

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

No annotations provided, so description carries full burden. It describes solving behavior, variable types, and input format, but doesn't mention side effects, error handling, or performance characteristics. Adequate but not detailed.

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?

Well-structured: purpose sentence, ideal-use sentence, Args list, Returns line, and example. Slightly verbose due to extensive example, but example is highly valuable for understanding parameter usage.

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

Completeness5/5

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

Given 8 parameters (6 required), nested objects, and no output schema, the description covers all parameters with explanations, an example, and return description. It is complete and actionable for an agent.

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

Parameters5/5

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

Schema description coverage is 0%, but the description provides a detailed Args section with explanations for all parameters and a comprehensive example, adding significant meaning beyond the bare schema.

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?

The description clearly states 'Solve linear and mixed-integer programming problems using HiGHS', specifying the exact type of problems (linear, MILP, large-scale with linear constraints). This differentiates it from siblings like solve_constraint_programming and solve_convex_optimization.

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?

It says 'ideal for linear programming, mixed-integer linear programming, and large-scale optimization problems with linear constraints', guiding when to use. However, it does not explicitly state when not to use or mention alternatives, though sibling names imply distinction.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sharmarajnish/MCP-Constrained-Optimization'

If you have feedback or need assistance with the MCP directory API, please join our Discord server