Skip to main content
Glama

math.polynomial_horner

Read-onlyIdempotent

Evaluate polynomials via Horner's method with Decimal coefficients supplied in descending order, returning the value and degree without float conversion.

Instructions

호너 방법으로 다항식 P(x) 를 Decimal 로 평가한다. coefficients 는 높은 차수부터 내림차순(예 [1, 0, -4] 는 x² - 4), x 는 Decimal 문자열이다. float 를 거치지 않으며 degree 도 함께 반환한다. 계수를 오름차순으로 넣으면 다른 다항식이 평가된다.

Input Schema

NameRequiredDescriptionDefault
xYes
coefficientsYes

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.9/5.0
Behavior4/5

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

The annotations already declare readOnly, idempotent, and closed-world behavior, so the bar is lower. The description still adds real behavioral value: it uses Decimal arithmetic and never goes through float, so results are exact rather than floating-point approximations; and it returns the degree as well as the value. It does not state limits on coefficient count or error behavior for malformed Decimal strings.

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?

The description is four short sentences, and it leads with what the tool computes before moving to parameter conventions. Every sentence carries information, including the ascending-order warning. It is slightly repetitive about ordering across two sentences.

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 two-parameter numeric evaluator with an output schema, this is complete enough. It covers arithmetic mode (Decimal, no float), input ordering conventions, the x format, and which return values to expect (value plus degree); all remaining details are documented by the schema.

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 description coverage is 0%, so the description must carry the full burden, and it mostly does: it defines the coefficient ordering as descending, gives a worked example ([1, 0, -4] is x²-4), and says x is a Decimal string. It does not explicitly state that each coefficient item is also a Decimal string, leaving that detail to be inferred from the schema's item type.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: evaluate polynomial P(x) using Horner's method in Decimal precision. An agent can immediately tell what the tool computes. It does not differentiate itself from sibling math.polynomial_roots, which is the nearest alternative, so it falls short of a 5.

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?

Usage is only implied: it is an evaluator for a polynomial at a point, as opposed to the root-finder. The description adds a practical warning that passing coefficients in ascending order evaluates a different polynomial, which is helpful usage guidance. However, it never says when to choose this tool over math.polynomial_roots or symbolic-based alternatives.

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