Skip to main content
Glama

math.interpolate_linear

Read-onlyIdempotent

Computes a value at a query point by linearly interpolating between two or more sample points, and returns an error instead of extrapolating outside the given range.

Instructions

표본점 (xs, ys) 를 직선으로 이어 x_query 에서의 값을 구하는 1차원 선형 보간이다. xs 는 엄격히 증가하는 2개 이상의 Decimal 문자열 리스트, ys 는 같은 길이. x_query 가 [min(xs), max(xs)] 밖이면 외삽하지 않고 오류를 낸다. float64 계산, 유효숫자 12자리.

Input Schema

NameRequiredDescriptionDefault
xsYes
ysYes
x_queryYes

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already mark it read-only, idempotent, and closed-world, so the description is not burdened with safety disclosure. It adds non-annotated behavior: out-of-range x_query raises an error rather than extrapolating, computation uses float64, and results are rounded to 12 significant digits. Return format is appropriately left to the output schema.

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?

Three sentences, front-loaded with the operation, then validation constraints, then numeric behavior. No filler; every sentence earns its place.

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?

The description covers invocation constraints, error behavior, and numeric precision, and an output schema exists for return values. Only sibling-selection context is thin, but for correct invocation the definition is nearly complete.

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 must carry parameter semantics. It specifies xs as 2+ strictly increasing Decimal strings, ys as same-length Decimal strings, and x_query as the evaluation point with an in-range constraint. This substantially compensates for the empty schema titles.

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 operation: 1D linear interpolation over sample points (xs, ys) evaluated at x_query. The word '선형' clearly distinguishes it from the sibling math.interpolate_cubic_spline, and the range/error rule further clarifies its scope.

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 gives valid-input prerequisites (2+ strictly increasing xs, matching ys length, x_query inside [min(xs), max(xs)]) and explicitly rules out extrapolation. However, it never names an alternative such as math.interpolate_cubic_spline or explains when linear interpolation is preferred over cubic spline, so tool selection is only implied.

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