Skip to main content
Glama

solve_constraints

Read-onlyIdempotent

Solve linear, mixed-integer, or quadratic programs to find provably optimal variable assignments and objective value using the HiGHS solver.

Instructions

[Premium] Solve linear / mixed-integer / quadratic programs (HiGHS solver). Use when the objective and constraints are linear (or quadratic) and you need a provably optimal solution: budget allocation across line items, supply chain optimization, capacity planning with integer counts, portfolio construction with hard caps. For continuous black-box objectives, use optimize_cmaes. For task→slot scheduling, use solve_schedule. Returns variable assignments + objective value. Requires ORACLAW_API_KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directionYes
objectiveYesMap of variable name → coefficient in the objective function.
variablesYes
constraintsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusYese.g. 'optimal', 'infeasible', 'unbounded'.
objectiveValueNoObjective at the optimum (when status='optimal').
variablesNoMap of variable name → solved value.
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is clear. The description adds value by specifying that the tool returns 'variable assignments + objective value', that it is a solver using HiGHS, and that it requires the ORACLAW_API_KEY. This extra context justifies a score above 3 without contradicting any annotations.

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?

The description is two sentences and a short note. The first sentence defines the core purpose compactly, the second provides usage guidance and alternative tools, and the third mentions returns and requirements. Every sentence adds distinct value with no redundancy or verbose explanations. This is highly efficient.

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

Completeness4/5

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

For a complex optimization tool, the description covers the problem type, optimality guarantee, example domains, and alternative tools. It mentions the return value. However, it omits details about input structure (though schema exists) and does not explain the output schema despite its existence. An agent might need to infer the variable conventions, but the description is largely sufficient for the main scenarios. Could be improved with more param guidance, but overall good.

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 description coverage is only 25%, meaning most parameters lack schema-level descriptions. The tool description does not compensate: it mentions the type of coefficients but gives no guidance on how to structure direction, objective map, variable list, or constraint objects. For a complex optimization tool, this leaves significant ambiguity for the agent. The use-case examples imply structure but do not directly explain the parameters.

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 what the tool does: 'Solve linear / mixed-integer / quadratic programs (HiGHS solver).' It provides specific examples of use cases (budget allocation, supply chain optimization, etc.) and explicitly distinguishes from sibling tools like optimize_cmaes and solve_schedule, leaving no ambiguity about its purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool: 'Use when the objective and constraints are linear (or quadratic) and you need a provably optimal solution.' It also provides clear alternatives: 'For continuous black-box objectives, use optimize_cmaes. For task→slot scheduling, use solve_schedule.' This gives the agent clear decision-making context.

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/Whatsonyourmind/oraclaw'

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