Skip to main content
Glama

Optics Lens Design

optics_lens_design
Read-only

Run first-order and spot analysis on sequential optical systems to compute EFL, BFL, F-number, and RMS spot size, with clear degradation when the optics extra is unavailable.

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}.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "surfaces": "<surfaces>"
    },
    "name": "optics_lens_design"
  }
}

Input Schema

NameRequiredDescriptionDefault
epdNo
fnoNo
surfacesYes
want_spotNo
workspaceNoRun this call in this named workspace
image_solveNo
wavelengths_umNo
field_angles_degNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.7
    • addedInput schema / properties / workspace
      Added value: +{
      +  "default": "",
      +  "description": "Run this call in this named workspace",
      +  "title": "Workspace",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.1/5.0
Behavior5/5

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

The description adds substantial behavior beyond the annotations: it discloses the optiland dependency, the {ok:false, reason, install} degradation path, the single-lens oracle_dev_pct gate, and the exact stop-surface constraint. It also describes the returned fields and how image_solve affects the last gap, which is valuable for a read-only computation tool.

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 dense but front-loaded: purpose first, then dependency/fallback, then parameter semantics, then return shape. Every sentence carries useful technical information, and the structure maps naturally to how an agent would parse a complex optics tool.

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?

For a complex 8-parameter tool with no output schema, the description covers required inputs, defaults, stop-surface constraints, dependency behavior, and return fields. The main omissions are want_spot semantics and explicit sibling alternatives, but the core call path is well specified.

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?

With only 13% schema description coverage, the description compensates well by explaining surfaces structure, the exactly-one stop requirement, epd OR fno, wavelength ordering/default, field_angles default, and image_solve behavior. It does not explain want_spot, and workspace is only covered by the schema, so a minor gap remains.

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 states a specific verb and resource: 'First-order + spot analysis of a SEQUENTIAL optical system with optiland.' It clearly identifies the analysis type and backend, which distinguishes it from broader optics siblings, though it does not explicitly name alternatives like optics_raytrace or optics_solid_trace.

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?

It explains the optics-extra requirement and degradation behavior, and mentions the single-lens oracle gate. However, it does not explicitly say when to use this tool versus optics_raytrace, optics_solid_trace, or optics_lens_optimize, leaving the agent to infer selection from the sequential-system scope.

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