Skip to main content
Glama

formulate_math_model

Converts a problem specification into a rigorous LP/MILP/MINLP optimization formulation with sets, parameters, variables, objective, and constraints; accepts optional reviewer feedback.

Instructions

Develops a rigorous mathematical optimization formulation (sets, parameters, variables, objective function, constraints) in LP/MILP/MINLP format from a problem specification. Optionally incorporates reviewer feedback.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
feedbackNo
specificationYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It states the output format (LP/MILP/MINLP) and the expected components (sets, parameters, variables, objective, constraints), which is useful. But it does not describe error behavior, input constraints, whether the output is deterministic, or how feedback is applied. For a generation tool with no annotations, more behavioral detail would be expected.

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 a single, well-structured sentence that front-loads the core action and output, then mentions the optional feedback capability. No wasted words; every clause adds information.

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?

The tool has a relatively simple interface (2 parameters) and an output schema is present, so the description need not explain return values. It covers the essential purpose and output artifact, and mentions the optional feedback path. However, the lack of any parameter format guidance or workflow context leaves minor gaps for an agent to infer.

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 0%, meaning the two parameters (`specification` and `feedback`) receive no explanation in the schema. The description mentions 'problem specification' (implying the `specification` parameter) and 'reviewer feedback' (implying `feedback`), but provides no format, content, or expected structure for either. This is inadequate compensation for a 0% coverage 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 contains a specific verb and resource: 'Develops a rigorous mathematical optimization formulation ... in LP/MILP/MINLP format from a problem specification.' This clearly distinguishes it from siblings such as `generate_model_code` (code generation) and `review_math_model` (review). It states the exact output artifact—a formulation with sets, parameters, variables, objective, and constraints.

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

Usage Guidelines3/5

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

The description mentions 'from a problem specification' and 'Optionally incorporates reviewer feedback,' which implies usage after a specification is available and optionally after review. However, it does not explicitly state when to choose this tool over siblings like `decompose_optimization_query` or `generate_model_code`, nor does it clarify prerequisites or order in a workflow. Usage is implied but not fully spelled out.

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