Skip to main content
Glama

math.interpolate_cubic_spline

Read-onlyIdempotent

Interpolate a query x-value from ≥4 strictly increasing Decimal points using a cubic spline with natural, clamped, or not-a-knot boundaries; error for out-of-range queries (no extrapolation).

Instructions

3차 스플라인 보간(scipy CubicSpline)으로 x_query 에서의 값을 구한다. xs 는 엄격히 증가하는 4개 이상의 Decimal 문자열 리스트, ys 는 같은 길이. bc_type 은 natural(기본), clamped, not-a-knot 중 하나. x_query 가 표본 구간 밖이면 외삽하지 않고 오류를 낸다. 유효숫자 12자리.

Input Schema

NameRequiredDescriptionDefault
xsYes
ysYes
bc_typeNonatural
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?

Adds real behavioral context beyond the annotations: no extrapolation, out-of-range x_query raises an error, and results carry 12 significant digits. Annotations already cover readOnly/idempotent safety, so this extra constraint and precision disclosure is a genuine value-add even without return-format details (output schema exists).

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?

Five dense sentences, each carrying distinct payload (algorithm, xs constraint, ys, bc_type options, no-extrapolation rule, precision), with the operation front-loaded. 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?

For a read-only numeric tool with an output schema covering return values, everything an agent needs to call it correctly is present: input shape and ordering constraint, valid bc_type values with default, and the failure mode on out-of-range queries.

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?

Schema coverage is 0%, so the description must carry the parameter burden and largely does: xs is a strictly increasing list of at least 4 Decimal strings, ys is the matching-length list, bc_type is one of natural/clamped/not-a-knot with a stated default, and x_query is the evaluation point. It stops short of stating that x_query must itself be a Decimal string, a small remaining gap.

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?

Names a specific verb and resource (cubic spline interpolation) and pins the algorithm (scipy CubicSpline), which distinguishes it from the sibling math.interpolate_linear. An agent can identify the operation without opening the schema.

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 description implies when the tool applies (cubic interpolation over tabulated points) but never explicitly contrasts with math.interpolate_linear or states consulting conditions such as needing smooth derivatives. Usage is inferable from context rather than stated.

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