Skip to main content
Glama

optics_lens_design

Analyze sequential lens systems by defining surfaces, aperture stop, EPD or f-number, wavelengths, and fields; return EFL, BFL, RMS spot, and oracle deviation.

Instructions

First-order + spot analysis of a SEQUENTIAL optical system with optiland (MIT, in-process). Requires the optics extra; degrades to {ok:false, reason, install} otherwise. For a single lens optiland is gated against the analytic thick-lens oracle (oracle_dev_pct).

surfaces: list (object->image) of {radius, thickness, material, stop?} — exactly one surface must set stop:true (the aperture stop). epd (entrance-pupil dia) OR fno. wavelengths_um (first is primary, default [0.5876]). field_angles_deg (default [0.0]). image_solve solves the last gap to paraxial focus.

Returns the degradation dict, or {ok, backend:'optiland', optiland_version, efl_mm, bfl_mm, fno, n_surfaces, rms_spot_um:[per field], oracle_efl_mm, oracle_dev_pct}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
epdNo
fnoNo
surfacesYes
want_spotNo
image_solveNo
wavelengths_umNo
field_angles_degNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does so well: it discloses the soft dependency and the graceful degradation to {ok:false, reason, install}, the single-lens oracle gating, and the constraint that exactly one surface must set stop:true. It omits things like expected units beyond what it lists or runtime/rate-limit characteristics, but the precondition and failure-mode coverage is strong for an unannotated tool.

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

Conciseness4/5

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

Purpose and dependency warning are front-loaded, and the parameter notes are terse and information-dense. It is slightly dense with backtick-heavy notation but each sentence carries concrete information, so little is wasted.

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?

No output schema exists, so the description usefully enumerates the return fields (degradation dict or {ok, backend, optiland_version, efl_mm, bfl_mm, fno, n_surfaces, rms_spot_um, oracle_efl_mm, oracle_dev_pct}). An agent has enough to call it correctly, with the only gap being the unexplained want_spot toggle.

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 description coverage is 0%, so the description must compensate, and it largely does: it explains the surfaces structure (object->image with {radius, thickness, material, stop?}), the epd-OR-fno relationship, the primary-wavelength convention with default 0.5876, the field_angles_deg default, and the semantics of image_solve. It never explains want_spot, leaving one of seven parameters undocumented.

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?

States a specific analysis type (first-order + spot) applied to a specific resource (a SEQUENTIAL optical system via optiland), which distinguishes it from the raytrace and solid_trace siblings. It does not explicitly name or contrast with the closest siblings (optics_lens_optimize, optics_raytrace), leaving some differentiation to inference.

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 gives a prerequisite ('Requires the `optics` extra') and a special gating case for single lenses, but never states when to choose this tool over optics_raytrace, optics_lens_optimize, or optics_solid_trace. Usage context is implied rather than routed.

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