Skip to main content
Glama

science.thin_lens

Read-onlyIdempotent

Calculates the missing focal, object, or image distance in the thin-lens equation from two exact decimal inputs and returns magnification.

Instructions

얇은 렌즈 방정식 1/f = 1/p + 1/q에서 빠진 값 하나(초점거리, 물체거리, 상거리)를 구하고 배율 m = -q/p도 돌려준다. 세 인자 중 정확히 2개를 Decimal 문자열로 주며 길이 단위는 통일한다. 반올림하지 않으며 0 거리나 평행광선(무한대) 조합은 오류다. 실상은 양, 허상은 음의 거리 부호 규약을 따르므로 부호를 맞춰 넣어야 한다.

Input Schema

NameRequiredDescriptionDefault
image_distNo
object_distNo
focal_lengthNo

Output Schema

NameRequiredDescriptionDefault
_metaNo서버가 붙이는 영수증(integrity), 엔진, 힌트
traceYes계산 근거(tool, formula, inputs, steps, output)
image_distNo
object_distNo
focal_lengthNo
magnificationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the read-only and idempotent annotations, the description adds meaningful behavioral detail: no rounding is performed, invalid combinations such as zero distance or infinity raise errors, and real versus virtual images follow a positive/negative distance sign convention. This is exactly the kind of operational context an agent needs before invoking the 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 compact and front-loaded: it states the equation and output first, then input rules, error conditions, and sign convention. Every sentence adds necessary information with no filler.

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?

Given three parameters, an existing output schema, and the mathematical nature of the tool, the description is complete enough to call correctly. It covers input cardinality, types, units, error cases, sign convention, and the additional magnification return value without redundantly describing output structure.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden and compensates well. It explains that focal_length, object_dist, and image_dist are Decimal strings, that exactly two must be supplied, that units must be consistent, and how signs encode real versus virtual images.

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 states a specific calculation: solve the thin lens equation 1/f = 1/p + 1/q for exactly one missing value and return magnification m = -q/p. It names the three possible quantities and their roles, so an agent can immediately distinguish this from unrelated science tools such as science.snell_law or science.bragg.

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 gives clear invocation rules: supply exactly two of the three values as Decimal strings, keep length units consistent, and note that zero distance or infinity/parallel-ray combinations are errors. It does not name an alternative tool, but there is no obvious sibling alternative, so the remaining gap is minor.

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