modular_arithmetic
Perform modular arithmetic operations: calculate modular exponentiation, modular inverse, or remainder for cryptographic and number-theoretic tasks.
Instructions
Modular arithmetic operations: modpow (a^b mod m), modinverse (a^-1 mod m), or mod (a mod m).
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>",
"a": "<a>",
"m": "<m>"
},
"name": "modular_arithmetic"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | Base value. | |
| b | No | Exponent (required for modpow). | |
| m | Yes | Modulus (positive integer). | |
| operation | Yes | Operation: modpow, modinverse, or mod. |