Skip to main content
Glama
Jambozx

OnlineCyberTools MCP (280+ filterable tools)

math_gcd_lcm_calculator

Read-onlyIdempotent

Compute GCD and LCM of integers with all reduction steps, or prime-factorize a number into prime-exponent pairs.

Instructions

GCD / LCM Calculator and Prime Factorizer. Compute the greatest common divisor (GCD) and least common multiple (LCM) of a list of integers, or prime-factorize a single integer. GCD/LCM use the pairwise Euclidean algorithm (BigInt-backed so LCM never overflows) and return every reduction step; factorize uses trial division and returns prime/exponent pairs plus a pretty string. Set operation to gcd, lcm, or factorize. Use this for number-theory reductions; use math_prime_number_checker for primality/next-prime, math_factorial_calculator for n!/nPr/nCr, and math_bitwise_calculator for bit operations. Runs locally on the numbers you provide: read-only, non-destructive, contacts no external service, and is rate-limited (60 requests/minute for anonymous callers). Returns the result value plus the worked steps (GCD/LCM) or factor list (factorize).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationYesWhich computation to run: gcd or lcm (require numbers) or factorize (requires n).
numbersNoRequired for gcd/lcm: 2 to 32 integers. GCD rejects an all-zero list; LCM rejects any zero. String digits like "12" are accepted and coerced.
nNoRequired for factorize: a single integer from 2 to 10^12 (1000000000000) to prime-factorize.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successNoWhether the computation succeeded.
resultNoOperation output. gcd/lcm/factorize each populate different fields.
errorNoPresent only on failure: the validation/computation error message.
Behavior5/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true. The description adds algorithmic details (Euclidean algorithm, trial division, BigInt), confirms local execution with no external service, and specifies rate limits (60 req/min). No contradictions.

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 a single, focused paragraph that front-loads the core function. It efficiently covers purpose, usage, and behavior without waste. Could be slightly tighter but is well-structured.

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 presence of an output schema, the description need not detail return values, yet it still mentions return structure. It covers algorithms, rate limits, local execution, and parameter requirements, making it fully informative for an agent.

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 coverage is 100% with descriptions for all parameters. The description adds minor context (string coercion for 'numbers', algorithm notes) but largely restates schema info. Minimal additional value beyond schema, so baseline 3.

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 identifies the tool as a GCD/LCM calculator and prime factorizer. It specifies the operations (gcd, lcm, factorize) and distinguishes from siblings like math_prime_number_checker, math_factorial_calculator, and math_bitwise_calculator, leaving no ambiguity about its purpose.

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?

Explicitly states when to use the tool ('for number-theory reductions') and when not to, with named alternative tools. Also mentions rate-limiting and local execution, providing clear usage context.

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