Math & Numbers
Bézout coefficients for any-sign integers with the full division-step table, lcm, and optional linear Diophantine solving (particular + general solution).
Call this tool from your code in three languages.
curl -X POST 'http://127.0.0.1:3003/en/api/tools/extended-euclidean-algorithm' \
-H 'Content-Type: application/json' \
-d '{"a":"240","b":"46","c":"e.g. 4 — leave empty for the plain Bézout identity","style":"steps"}'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/extended-euclidean-algorithm| Name | Type | Required | Description |
|---|---|---|---|
| a | text | Yes | First integer; negative values are supported. |
| b | text | Yes | Second integer; negative values are supported. |
| c | text | No | Optional target: solves ax + by = c when gcd(a, b) divides c. |
| style | select | Yes | — |
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-extended-euclidean-algorithm": {
"name": "extended-euclidean-algorithm",
"description": "Bézout coefficients for any-sign integers with the full division-step table, lcm, and optional linear Diophantine solving (particular + general solution).",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=extended-euclidean-algorithm",
"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": "extended-euclidean-algorithm",
"arguments": {
"a": "240",
"b": "46",
"c": "e.g. 4 — leave empty for the plain Bézout identity",
"style": "steps"
}
}
}Questions or issues? Contact [email protected]