Skip to main content
Glama
Jambozx

OnlineCyberTools MCP (280+ filterable tools)

math_prime_number_checker

Read-onlyIdempotent

Test an integer for primality, get its prime factorization (for composites up to 10^12), list primes in a range, or find the next/previous prime. Deterministic algorithms up to 2^64.

Instructions

Prime Number Checker, Factorizer, and Range Sieve. Test whether an integer is prime, list every prime within a numeric range, or find the next/previous prime relative to a number. The check operation reports primality plus a human-readable reason, the prime factorization (for composites up to 10^12), the surrounding primes, and which algorithm ran (trial division for n up to 10^12, deterministic Miller-Rabin up to 2^64). Use this for primality, factorization, and prime enumeration; use math_gcd_lcm_calculator for greatest common divisor / least common multiple, math_factorial_calculator for n! / nPr / nCr, and math_fibonacci_generator for Fibonacci sequences. Pure computation: deterministic, read-only, non-destructive, contacts no external service, and rate-limited (60 requests/minute for anonymous callers). Pass integers above 2^53 as numeric strings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationYesWhich computation to run: check tests one integer (needs n); listPrimes enumerates primes between from and to; nextPrevPrime finds the adjacent prime to n in a given direction.
nNoTarget integer for check and nextPrevPrime. Must be a non-negative base-10 integer; pass values above 2^53 as a numeric string. Hard upper bound 2^64.
fromNoInclusive lower bound for listPrimes. Non-negative integer.
toNoInclusive upper bound for listPrimes. Non-negative integer; must be at least from, at most 10^8, and span (to minus from) at most 100000.
directionNoRequired for nextPrevPrime: next finds the smallest prime greater than n, prev the largest prime less than n (null if none exists).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successNoWhether the operation succeeded.
resultNoOperation-specific payload.
errorNoPresent only on failure; the validation message.
Behavior5/5

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

Annotations already declare readOnlyHint, destructiveHint, idempotentHint. The description adds details: deterministic, read-only, non-destructive, no external service, rate-limited, and the algorithms used (trial division, Miller-Rabin). No contradiction; adds value 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?

The description is concise (about 10 sentences) and well-structured: summary sentence, operation details, usage guidelines, computational properties, and data convention. Every sentence adds value without redundancy.

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?

Given the tool's moderate complexity (three operations, output schema exists), the description covers all necessary aspects: operation modes, input constraints, algorithm behavior, rate limits, and data format. It is complete enough for an agent to select and invoke 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?

Schema description coverage is 100%, but the description adds significant meaning: it explains the three operations, the check operation's output (primality, factorization, surrounding primes, algorithm), range constraints (max span 100000, up to 10^8), and data type guidance (string for >2^53). This goes beyond the schema's brief descriptions.

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?

The description clearly states the tool's purpose: prime checking, factorization, range sieve, next/prev prime. It distinguishes itself from sibling tools like math_gcd_lcm_calculator, math_factorial_calculator, and math_fibonacci_generator by specifying alternative use cases.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool (primality, factorization, prime enumeration) and when to use alternatives (gcd/lcm, factorial, Fibonacci). It also includes important usage details like passing large integers as strings and rate limits.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jambozx/onlinecybertools-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server