Skip to main content
Glama

math.polynomial_roots

Read-onlyIdempotent

Compute all real and complex roots of a polynomial from descending-order decimal coefficients, supporting degrees 1–256 with a nonzero leading term.

Instructions

다항식의 모든 근(복소근 포함)을 numpy.roots 로 구한다. coefficients 는 높은 차수부터 내림차순 Decimal 문자열 리스트(예 [1, 0, -4] 는 x² - 4)이며 1차 이상 256차 이하, 최고차 계수는 0 이 아니어야 한다. 각 근은 {real, imag} 12자리 문자열이고 정렬되어 있지 않다. 오름차순으로 넣으면 다른 다항식이 되며 중근이 많으면 정밀도가 떨어진다.

Input Schema

NameRequiredDescriptionDefault
coefficientsYes

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare read-only/idempotent/closed-world, and the description adds valuable behavioral context: precision degradation with many repeated roots and the fact that roots are unsorted {real, imag} 12-digit strings. This goes meaningfully beyond annotations.

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?

Dense but front-loaded: purpose first, then parameter format, then pitfalls. Every sentence conveys actionable information with 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?

Despite an output schema existing, the description still clarifies the return shape and ordering, plus precision caveats and input constraints. For a single-parameter read-only tool, an agent has everything needed to call it correctly.

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?

With 0% schema coverage on the single parameter, the description fully compensates: it explains the descending order convention, the worked example ([1,0,-4] = x²-4), the type (Decimal strings), degree bounds, and the nonzero-leading-coefficient rule. Nothing about the parameter is left unclear.

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 a specific verb+resource: computes all roots including complex using numpy.roots. Clearly distinguishes itself from siblings like math.polynomial_horner (evaluation) and symbolic.solve without needing schema inspection.

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?

Provides concrete constraints (descending order, degree 1-256, nonzero leading coefficient) that guide correct invocation, plus a warning about ascending order and repeated roots. It doesn't explicitly name an alternative tool or when-not-to-use, which keeps it at 4 rather than 5.

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