Skip to main content
Glama

optimize_minimize

Minimize scalar objective functions with bounds, equality, or inequality constraints using SciPy optimization methods and optional parameters.

Instructions

Minimize a scalar expression with scipy.optimize.minimize.

Variables are named ``x0, x1, ...`` in the order of ``x0``. When ``method``
is omitted, SLSQP is used if ``constraints`` is given, otherwise L-BFGS-B
is used if ``bounds`` is given, otherwise scipy's default (BFGS).

Each constraint is ``{"kind": "ineq"|"eq", "expr": "..."}`` where ``expr``
is a sympy expression parsed with the variables and ``params``; ``ineq``
means ``expr >= 0`` and ``eq`` means ``expr == 0``.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
x0Yes
boundsNo
methodNo
paramsNo
objectiveYes
constraintsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full load and does disclose real behavioral traits: solver fallback logic (SLSQP → L-BFGS-B → BFGS) and exact constraint semantics (ineq means expr >= 0, eq means expr == 0). It omits key traits such as whether the optimization is local, whether it can fail/non-converge, and what is returned.

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?

Front-loaded purpose sentence, then two compact paragraphs covering variable naming, default-solver selection, and constraint structure. No filler; every sentence adds information an agent needs.

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

Completeness3/5

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

For a 6-parameter, no-annotation, no-output-schema tool, the description covers the unusual semantics well but leaves the return value, bounds format, and failure/convergence behavior unexplained. It is adequate but not complete for an agent that must interpret results or format bounds correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate, and it does for most parameters: x0 ordering/variable naming, the constraint dict shape (kind/expr), and params interpolation into expressions. Bounds format (pair-of-pairs, min/max ordering) and the objective's expected syntax are only implied, leaving a modest gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource: 'Minimize a scalar expression with scipy.optimize.minimize.' That is unambiguous and action-oriented. It does not, however, distinguish itself from sibling optimizers such as global_optimize, linear_program, or integer_program, so an agent must infer the boundary on its own.

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 explains how the default solver is chosen based on constraints/bounds/method, which is useful selection context, but it never says when to prefer this tool over global_optimize or the LP/IP siblings. Usage is implied rather than stated.

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