Skip to main content
Glama

math.diff_five_point

Read-onlyIdempotent

Approximate a function's first derivative at a point using the five-point central-difference formula, giving O(h^4) accuracy for numeric differentiation beyond standard central differences.

Instructions

5점 공식 f'(x) ≈ (-f(x+2h) + 8 f(x+h) - 8 f(x-h) + f(x-2h)) / (12 h) 로 x 에서의 1차 도함수를 수치 근사한다. 중심 차분보다 정확도가 높다(O(h⁴)). expression 은 core.calc 문법, h 는 양수(기본 0.001), float64 계산이며 유효숫자 12자리다. x±2h 구간에서 정의되지 않는 함수에는 쓸 수 없다.

Input Schema

NameRequiredDescriptionDefault
hNo0.001
xYes
variableNox
expressionYes

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.1/5.0
Behavior4/5

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

Annotations already cover read-only/idempotent/closed-world safety. The description adds behavior beyond that: float64 arithmetic, 12 significant digits of output, default h=0.001, and the domain restriction on x±2h — all real operational context an agent would not otherwise know.

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?

Front-loads the formula and accuracy claim, then the parameter and domain constraints in tight sentences. The formula is long but earns its place by pinning down the exact method; nothing is redundant.

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?

An output schema exists, so return-value explanation is unnecessary; the description instead supplies precision/type and domain limits. The only real gap is the undocumented 'variable' parameter, which matters for expressions using a symbol other than x.

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 description coverage is 0%, so the description must carry parameter meaning. It documents expression (core.calc syntax), h (positive, default 0.001), and x implicitly via the formula, but the 'variable' parameter (default 'x') is never mentioned, leaving one of four parameters unexplained.

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 the exact operation (numerical approximation of the first derivative at x) and even gives the specific 5-point stencil formula, so there is no ambiguity about what is computed. It explicitly contrasts itself with the central-difference method, which distinguishes it from the sibling math.diff_central.

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 a clear selection rationale ('more accurate than central difference, O(h⁴)') and an explicit exclusion ('cannot be used on functions undefined over x±2h'). It does not name math.diff_central directly as the fallback tool, leaving the routing slightly implicit.

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