Skip to main content
Glama

science.snell_law

Read-onlyIdempotent

Calculate the refraction angle from two refractive indices and an incident angle using Snell's law; supports degree or radian output and flags total internal reflection.

Instructions

스넬의 법칙으로 굴절각을 계산한다. n1 sin(theta1) = n2 sin(theta2), theta2 = asin(n1/n2 * sin(theta1)). n1, n2는 양수 굴절률, theta1은 입사각이며 모두 Decimal 문자열이다. unit='deg'(기본) 또는 'rad'이고 결과도 같은 단위다. mpmath 40자리 계산 후 유효숫자 20자리로 돌려준다. 전반사가 일어나는 입사각이면 오류이며 각도는 법선 기준이다(표면 기준 각을 넣으면 안 된다).

Input Schema

NameRequiredDescriptionDefault
n1Yes
n2Yes
unitNodeg
theta1Yes

Output Schema

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

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?

Annotations only say read-only/idempotent/closed-world; the description adds what they cannot: 40-digit mpmath intermediate computation returned at 20 significant digits, identical units for input and output, and a declared error condition (total internal reflection). These are precisely the behavioral facts an agent needs before calling.

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?

Front-loaded with the purpose and formula, then input semantics, then units, precision, and error/convention caveats. Every sentence adds information; nothing is padded or restated from the title.

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?

An output schema exists, so return shape need not be described. Combined with full parameter semantics, unit handling, precision policy, and the total-internal-reflection error rule, an agent has everything required to call this correctly.

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 coverage is 0% (titles only), so the description carries the full burden and does: n1/n2 are positive refractive indices as Decimal strings, theta1 is the incident angle as a Decimal string measured from the normal, and unit accepts 'deg' (default) or 'rad' with the result in the same unit.

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?

States a specific verb and resource ('스넬의 법칙으로 굴절각을 계산한다') and immediately gives the governing equation theta2 = asin(n1/n2 * sin(theta1)), so the computed quantity is unambiguous. No sibling (science.bragg, science.thin_lens) could be confused with it.

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?

Gives concrete preconditions and exclusions: angles are measured from the normal, not the surface ('표면 기준 각을 넣으면 안 된다'), and total internal reflection is an error case. It does not name an alternative tool, but for this narrow physics function no alternative is plausibly in 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