Skip to main content
Glama

ntt

Multiplies two polynomials via Number Theoretic Transform modulo 998244353. Input coefficient arrays to compute the convolution product for modular arithmetic and competitive programming tasks.

Instructions

Multiply two polynomials using Number Theoretic Transform (mod 998244353).

Input Schema

NameRequiredDescriptionDefault
poly_aYesFirst polynomial coefficients
poly_bYesSecond polynomial coefficients

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It usefully discloses the algorithm and modulus, but says nothing about coefficient constraints (e.g., inputs must be non-negative and below the modulus) or what is returned, which matters for a deterministic math routine.

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?

A single tight sentence with the operation, algorithm, and modulus front-loaded, and no padding. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description should ideally state the return shape (coefficient array) and any input bounds. It covers the algorithm but leaves the calling contract partly implicit.

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 100%, so both poly_a and poly_b are already documented as coefficient arrays in the schema. The description adds no per-parameter detail beyond the schema baseline.

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?

Names a specific operation (multiply two polynomials), the algorithm (Number Theoretic Transform), and the working modulus (998244353). An agent can tell it performs a computational transform, though it is not differentiated from the similar sibling polynomial_ops or convolution.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

No guidance on when to use this versus polynomial_ops, convolution, or fft_transform, and no prerequisites stated. Usage must be inferred entirely from the one-line purpose.

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