Math & Numbers
Generalized pairwise-merge CRT for 2–20 congruences: coprime moduli give the product modulus, consistent non-coprime moduli give the lcm, inconsistent systems are rejected.
Call this tool from your code in three languages.
curl -X POST 'http://127.0.0.1:3003/en/api/tools/chinese-remainder-theorem' \
-H 'Content-Type: application/json' \
-d '{"remainders":"2, 3, 2","moduli":"3, 5, 7"}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST http://127.0.0.1:3003/en/api/tools/chinese-remainder-theorem| Name | Type | Required | Description |
|---|---|---|---|
| remainders | text | Yes | Comma- or space-separated remainders, one per congruence; negative values are reduced mod m. |
| moduli | text | Yes | Comma- or space-separated moduli (each m ≥ 2), matching the remainders count. |
Text result
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-chinese-remainder-theorem": {
"name": "chinese-remainder-theorem",
"description": "Generalized pairwise-merge CRT for 2–20 congruences: coprime moduli give the product modulus, consistent non-coprime moduli give the lcm, inconsistent systems are rejected.",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=chinese-remainder-theorem",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "chinese-remainder-theorem",
"arguments": {
"remainders": "2, 3, 2",
"moduli": "3, 5, 7"
}
}
}Questions or issues? Contact [email protected]