Skip to main content
Glama

math.diff_central

Read-onlyIdempotent

Numerically approximate the first derivative of a mathematical expression at a specified point using the central difference formula, with adjustable step size for accuracy.

Instructions

중심 차분 f'(x) ≈ (f(x+h) - f(x-h)) / (2h) 로 x 에서의 1차 도함수를 수치 근사한다. expression 은 core.calc 문법의 수식, variable(기본 x)이 자유 변수, h 는 양수 Decimal 문자열(기본 0.001). float64 계산이며 결과는 유효숫자 12자리다. h 를 지나치게 작게 잡으면 상쇄 오차가 커지고, 도함수 식 자체가 필요하면 symbolic.diff 를 쓴다.

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.2/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, closed-world behavior, so the safety profile is covered. The description adds genuine value with float64 arithmetic, 12-significant-digit output, and the step-size/cancellation tradeoff, but says nothing about failure behavior (e.g. domain errors in f) or how the result is returned.

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?

Dense and front-loaded: method and formula first, then parameter semantics, then numerical caveat and alternative. No filler sentences, though the parameter enumeration is packed into a single long line.

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, and precision plus error behavior are covered. The main gap is that the sibling five-point rule and the accuracy/performance comparison to it are never mentioned.

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 does: expression uses core.calc syntax, variable is the free variable (default x), x is the evaluation point, and h is a positive Decimal string with default 0.001. Every one of the four parameters is given meaning the schema lacks.

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 method and resource (central-difference numerical approximation of the first derivative at x) and even gives the formula. An agent can distinguish it from symbolic.diff and from the other numerical differentiator siblings 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes to symbolic.diff when an exact derivative expression is needed, and warns that an overly small h increases cancellation error. It does not mention math.diff_five_point as the higher-accuracy alternative, so the sibling routing is only partly covered.

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