Skip to main content
Glama

Constrained Optimization MCP Server

solve_convex_optimization

Solve convex optimization problems with CVXPY by defining variables, objectives, and constraints for linear, quadratic, and semidefinite programming.

Instructions

Solve convex optimization problems using CVXPY. This tool is ideal for mathematical optimization problems with convex objectives and constraints, including linear programming, quadratic programming, and semidefinite programming. Args: variables: List of variable definitions with 'name' and 'shape' objective_type: Either 'minimize' or 'maximize' objective_expr: The objective function expression as a string constraints: List of constraint expressions as strings parameters: Dictionary of parameter values (e.g., matrices A, b) description: Optional problem description Returns: Solution results including variable values and objective value Example: variables = [{"name": "x", "shape": 2}] objective_type = "minimize" objective_expr = "cp.sum_squares(x)" constraints = ["x >= 0", "cp.sum(x) == 1"]

Input Schema

NameRequiredDescriptionDefault
constraintsYes
descriptionNo
objective_exprYes
objective_typeYes
parametersNo
variablesYes

Input Schema (JSON Schema)

{ "properties": { "constraints": { "items": { "type": "string" }, "title": "Constraints", "type": "array" }, "description": { "default": "", "title": "Description", "type": "string" }, "objective_expr": { "title": "Objective Expr", "type": "string" }, "objective_type": { "title": "Objective Type", "type": "string" }, "parameters": { "default": null, "title": "Parameters", "type": "object" }, "variables": { "items": { "type": "object" }, "title": "Variables", "type": "array" } }, "required": [ "variables", "objective_type", "objective_expr", "constraints" ], "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