Skip to main content
Glama

Constrained Optimization MCP Server

solve_linear_programming

Solve linear and mixed-integer programming problems with linear constraints using the HiGHS solver for optimization tasks.

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

NameRequiredDescriptionDefault
constraint_matrixYes
constraint_sensesYes
descriptionNo
objective_coeffsYes
optionsNo
rhs_valuesYes
senseYes
variablesYes

Input Schema (JSON Schema)

{ "properties": { "constraint_matrix": { "items": { "items": { "type": "number" }, "type": "array" }, "title": "Constraint Matrix", "type": "array" }, "constraint_senses": { "items": { "type": "string" }, "title": "Constraint Senses", "type": "array" }, "description": { "default": "", "title": "Description", "type": "string" }, "objective_coeffs": { "items": { "type": "number" }, "title": "Objective Coeffs", "type": "array" }, "options": { "default": null, "title": "Options", "type": "object" }, "rhs_values": { "items": { "type": "number" }, "title": "Rhs Values", "type": "array" }, "sense": { "title": "Sense", "type": "string" }, "variables": { "items": { "type": "object" }, "title": "Variables", "type": "array" } }, "required": [ "sense", "objective_coeffs", "variables", "constraint_matrix", "constraint_senses", "rhs_values" ], "type": "object" }

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