Skip to main content
Glama

ampl_solve

Solve the current AMPL optimization model and receive a concise summary of the solver outcome, including a tail of the output log.

Instructions

Solve the current model and summarise the outcome.

Returns a bounded tail of solver output, not the whole log. Read duals and reduced costs afterwards with ampl_get_data(name, suffix="dual"|"rc").

ok is only true when solve_result is exactly "solved", no error or warning was captured, no output-stream failure marker was seen, AND at least one objective was declared: AMPL happily reports solve_result "solved" for a session with no model at all, or for a model with no objective, even though no solver was ever reached.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
solverNo
optionsNo
sessionNo
log_tailNo
objectiveNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations present, the description carries the full transparency burden and does so exceptionally. It explains the bounded tail behavior, the strict `ok` condition, and the edge cases where AMPL reports 'solved' without actually running a solver, providing deep insight beyond the schema.

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 tightly structured, front-loaded with the main action, and every sentence earns its place. The third sentence is dense but packed with necessary edge-case detail, with no fluff or repetition.

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?

Given the tool's complexity and the absence of annotations, the description provides strong behavioral coverage including output constraints and error conditions. However, it omits guidance for the five parameters and does not fully integrate with sibling tools beyond the duals mention, leaving some invocation ambiguity.

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%, and the description does not compensate for the five parameters. `solver`, `options`, `session`, `objective`, and `log_tail` are never individually explained; only vague references like 'bounded tail' and 'objective' give partial meaning.

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 opens with a specific verb and resource: 'Solve the current model and summarise the outcome.' This clearly distinguishes ampl_solve from siblings like ampl_eval or ampl_get_data by stating exactly what it acts on and what it returns.

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?

The description implies use after a model is set up and explicitly recommends ampl_get_data for retrieving duals and reduced costs, which gives useful alternative guidance. It does not state explicit exclusions or when not to use the tool, but the context is clear enough.

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/worc4021/ampl-mcp'

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