Skip to main content
Glama
LensBench MCP

LensBench MCP

Official
by OpticChat

lens_apply

Apply one or more .lens DSL statements in a single call to update an optical design; set dry_run=true to preview changes before applying.

Instructions

Apply one or more .lens DSL statements in a single call (preview with dry_run=true). [Mutates design]

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": {
      "statements": "<statements>"
    },
    "name": "lens_apply"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNo
statementsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.4/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 burden, and '[Mutates design]' plus the dry_run preview hint do useful work by flagging this as a state-changing operation. It remains silent on the behavior that matters most for a batch mutation: whether statements are applied atomically (all-or-nothing), what happens on a mid-batch syntax error, and whether the change is undoable.

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?

Two tight clauses with the operation and its batch scope front-loaded, and the mutation warning tagged at the end. Nothing is redundant, though the bracketed marker is terse enough to be easy to skim past.

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 two-parameter mutation tool with no annotations and no output schema, the description covers the what and the safe-preview path but not the outcome: whether a dry_run call returns a diff or parsed diagnostics, and whether a successful apply returns anything at all. That return-shape gap matters because the output schema cannot fill it.

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 coverage is 0%, so the description must compensate, and it partially does: 'one or more statements' clarifies that 'statements' is a multi-statement DSL string, and 'preview with dry_run=true' explains what the boolean actually does. It adds no detail on the DSL grammar, statement separators, or escaping, leaving an agent guessing at the accepted string format.

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 verb and resource ('Apply one or more .lens DSL statements') and adds the batch dimension ('in a single call'), which is genuinely informative. It does not distinguish itself from siblings such as run_tool, set, or verify, so an agent hunting for the right mutation entry point gets no explicit routing.

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 parenthetical '(preview with dry_run=true)' gives a concrete usage pattern for safe trial runs, which is real guidance. However, it never says when to prefer this over set/run_tool, nor any prerequisites such as needing a loaded lens file or a valid DSL dialect.

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