Skip to main content
Glama
oce-math-mcp

oce-math-mcp

by oce-projects

number_theory

Solve exact integer and modular arithmetic problems, including primality, factorization, gcd, modular inverses, CRT, and Diophantine equations, with verifiable big-integer results.

Instructions

Integer and modular arithmetic with exact big integers: primality, factorization, divisors, totient, Mobius, primes, gcd/lcm/extended gcd, modular power/inverse/square root/log, primitive roots, Legendre/Jacobi, CRT, Diophantine equations, continued fractions, partitions, digits.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "operation": "<operation>"
    },
    "name": "number_theory"
  }
}

Input Schema

NameRequiredDescriptionDefault
kNoExponent, index or base.
mNoSecond integer or modulus.
nNoMain integer (decimal string allowed for big numbers).
exprNoEquation for diophantine; number for continued_fraction (e.g. 'sqrt(7)', '415/93').
limitNoMax listed items.
moduliNoModuli for crt.
valuesNoIntegers for gcd/lcm, residues for crt.
operationYes
variablesNo
show_stepsNoAdd numbered steps in Italian to result.steps.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose a meaningful behavioral trait — exact big-integer arithmetic, so results are not floating-point approximations — but says nothing about error behavior for invalid inputs (e.g. non-prime modulus for mod_inv), whether operations can be expensive on large inputs, or what the result object looks like.

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?

A single front-loaded sentence with the domain stated first and the capability list after; no filler or repetition. The long comma-separated enumeration is dense but every term is a distinct operation, so it earns its space.

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

Completeness2/5

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

For a tool with 10 parameters, 26 enum operations, no output schema, and no annotations, the description is thin. It never explains which parameters apply to which operation, what the return value contains, or how errors surface — gaps an agent must discover by trial.

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 80%, so the baseline is 3. The description adds only indirect meaning: operation names like crt, gcd/lcm, diophantine, and continued_fraction hint at how moduli/values/expr are used, but it never states which parameters each operation requires or how n, k, and m map to specific operations.

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?

The opening clause names a specific domain ('Integer and modular arithmetic with exact big integers') and the enumeration of operations (primality, factorization, CRT, discrete_log, etc.) makes the tool's scope concrete and clearly distinct from general evaluators. It stops short of naming which sibling to prefer, but the resource is unambiguous.

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?

There is no when-to-use or when-not-to-use guidance at all. An agent must infer from the operation list that this is for exact integer/modular problems rather than math_eval, math_numeric, or math_solve, and nothing states prerequisites or exclusions for the 26 operations.

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