Skip to main content
Glama

Constrained Optimize

zemax_constrained_optimize

Run bound-constrained optimization of optical system variables in Ansys Zemax OpticStudio using a custom Levenberg-Marquardt solver with finite-difference steps, damping, and restarts.

Instructions

Run the custom bound-constrained Levenberg-Marquardt optimizer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deltaNoFinite-difference step
initialMuNoInitial damping
maxRestartsNoFresh-Jacobian restarts
maxIterationsNoMaximum iterations
useBroydenUpdateNoUse rank-1 Jacobian updates

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.8/5.0
Behavior2/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 of behavioral disclosure, and it says nothing beyond the tool name. It does not state that optimization mutates the system (variables/merit function), whether runs are long or blocking, what happens on non-convergence, or whether prior state is recoverable. This is a significant gap for a state-mutating operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single front-loaded sentence with no padding, but at the cost of under-specification rather than true efficiency — there is room for a clause on when to choose this over zemax_optimize without bloat. Concise but too sparse to be useful.

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

Completeness2/5

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

With no annotations, no output schema, and a mutation-heavy operation, the description should explain at least what state is affected and when to prefer it over the sibling optimizers. As written it is inadequate for an agent to invoke the tool confidently.

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

Parameters3/5

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

Schema description coverage is 100% and all five numeric tuning parameters (delta, initialMu, maxRestarts, maxIterations, useBroydenUpdate) are documented in the schema itself. The description adds no meaning beyond the schema, which is the expected baseline when the schema does the heavy lifting.

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?

The description names a specific verb ('Run') and a specific optimizer ('custom bound-constrained Levenberg-Marquardt'), which is more precise than a generic 'optimize'. However, it offers no differentiation from the many sibling optimizers (zemax_optimize, zemax_multistart_optimize, zemax_hammer, zemax_global_search), so an agent cannot tell this apart from them without guessing.

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

Usage Guidelines2/5

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

There is no statement of when to use this optimizer versus the numerous sibling optimization tools, nor any preconditions (e.g. a merit function must exist, variables must be defined). The single sentence gives no routing guidance at all.

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

Deploy Server

Other Tools