Skip to main content
Glama
MERURUXD

CODE V MCP

by MERURUXD

update_lens

Batch modify surface, field, wavelength, and aperture parameters in an optical lens model with atomic all-or-nothing updates. Supports zoom positions and field set replacement.

Instructions

批量修改已有表面、视场、波长及受限孔径参数。

一批修改共享一个恢复点;只要有一条被拒绝,整批都不会生效。 由求解或拾取控制的参数会被拒绝,多变焦镜头必须给出 zoom_position。 视场可改 y_angle、x_angle、weight 与渐晕因子 vux/vlx/vuy/vly(-0.99~0.99)。 field_set 整体替换视场集合(1~10 个角度视场,含个数、角度、权重与渐晕因子), 单独成一次事务、不能与 edits 同批;省略的权重与渐晕因子沿用同编号视场的值, 新增视场权重为 1、渐晕为 0,像面求解(如 PIM)保持不变。仅支持单变焦、角度定义的视场。 孔径首版仅支持单变焦:target=aperture、parameter=value 保持现有 EPD/FNO/NA/NAO 类型只改数值;表面 clear_aperture_radius 只改已有的 单一、居中、圆形显式通光孔径半径。自动孔径、遮拦和复合定义只读。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes
outcomesYes
warningsNo
field_setNoPresent when the request replaced the field set.
raw_outputNo
rolled_backNo
restore_pointNoIdentifier of the recovery point taken before editing.
session_validNoFalse once the session can no longer be trusted for edits.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it states the whole batch is one transaction sharing a recovery point and that any single rejection rolls back the entire batch, which is critical for an agent to know before writing. It also discloses rejection rules (solves/pickups), read-only restrictions (auto aperture, obscurations, compound definitions), and inheritance semantics for field_set.

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 the atomicity rule are front-loaded, and the dense blocks on field_set and aperture constraints each add non-redundant rules. It is long, but the length tracks the real complexity of the tool; only the aperture section feels slightly compressed given how many edge cases it mentions.

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

Completeness5/5

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

For a batch-mutation tool with no annotations, the description covers atomicity, per-target selectors, zoom handling, field_set transaction isolation, and read-only cases. An output schema exists, so return values need not be explained, and nothing an agent needs to call this correctly appears to be missing.

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?

Top-level schema coverage is reported as 0%, but the description compensates by enumerating the per-target parameter names, the vignetting valid range (-0.99..0.99), the 1-10 field count limit of field_set, and the meaning of target=aperture/parameter=value. The nested $defs also carry their own descriptions, so this is well beyond the schema alone, though it does not restate every nested field.

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: batch-modifying existing surface, field, wavelength, and constrained-aperture parameters. The emphasis on '已有' (existing) parameters cleanly separates it from a structure-editing sibling like edit_lens_structure, which adds or removes optical elements.

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?

It sets concrete conditions and exclusions: solve/pickup-controlled parameters are rejected, multi-zoom lenses must supply zoom_position, field_set cannot be batched with edits, and only single-zoom angle-defined fields / single-zoom apertures are supported. It stops short of naming sibling tools (e.g. edit_lens_structure) as the alternative for structural changes, so it is context-rich but not fully routing.

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