Skip to main content
Glama
Jambozx

OnlineCyberTools MCP (280+ filterable tools)

math_factorial_calculator

Read-onlyIdempotent

Compute exact factorial, double factorial, permutations, and combinations using arbitrary-precision arithmetic for integers up to 10,000.

Instructions

Compute Factorial, Double Factorial, Permutations And Combinations. Compute exact integer combinatorics with arbitrary-precision BigInt: factorial (n!), double factorial (n!!), permutations (nPr), or combinations (nCr). Select the operation via the operation field; factorial and doubleFactorial take only n, while permutations and combinations also require r (with r at most n). Inputs n and r accept a number or a decimal-digit string and must be integers in the range 0 to 10000. Use this for exact counting and probability math where doubles lose precision (n! overflows IEEE 754 at n=171); use math_scientific_calculator instead for general expression evaluation, or math_gcd_lcm_calculator for greatest common divisor and least common multiple. Pure local computation: read-only, non-destructive, deterministic, contacts no external service, and is rate-limited (60 requests/minute for anonymous callers). Returns the result as a decimal string, its digit count, and leading digits for very large outputs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationYesWhich calculation to perform. permutations and combinations additionally require r.
nYesNon-negative integer 0 to 10000, as a number or decimal-digit string. For permutations and combinations this is the set size.
rNoSelection size for permutations and combinations: integer 0 to n. Required for those operations, ignored otherwise.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successNoTrue when the calculation succeeded.
operationNoThe operation that was performed.
resultNoThe computed value and its shape.
Behavior5/5

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

Annotations already declare readOnlyHint, destructiveHint, and idempotentHint. The description adds valuable behavioral context: pure local computation, deterministic, no external service contact, and rate limiting. No contradictions with annotations.

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 thorough and well-structured, front-loading the core purpose and operation details. Every sentence earns its place, though it is somewhat lengthy. A slight reduction could improve conciseness without losing clarity.

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 existence of an output schema, the description does not need to explain return values. It covers purpose, usage guidelines, behavioral transparency, and parameter semantics comprehensively. It also mentions the return format (decimal string, digit count, leading digits) for very large outputs.

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 coverage is 100% with descriptions for all parameters. The description adds meaning by explaining operation selection, which parameters are required for each operation, that r must be at most n, and that inputs accept numbers or strings in the range 0-10000. This goes beyond the schema but is not vastly richer.

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 computes factorials, double factorials, permutations, and combinations with arbitrary-precision BigInt. It distinguishes itself from sibling tools like math_scientific_calculator and math_gcd_lcm_calculator by specifying its exact combinatorial use case.

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 (exact counting and probability math where doubles lose precision) and when not to (use math_scientific_calculator for general expression evaluation, math_gcd_lcm_calculator for GCD/LCM). It also mentions rate limits (60 requests/minute for anonymous callers) and that it is read-only and deterministic.

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