Health
RK4 simulation of the classic predator–prey oscillator with phase plane, closed orbits, equilibrium, and period analysis.
Call this tool from your code in three languages.
curl -X POST 'http://127.0.0.1:3003/en/api/tools/lotka-volterra-predator-prey' \
-H 'Content-Type: application/json' \
-d '{"rPrey":0.5,"aPred":0.01,"bConv":0.01,"mPred":0.4,"n0":60,"p0":30,"tMax":60}'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/lotka-volterra-predator-prey| Name | Type | Required | Description |
|---|---|---|---|
| rPrey | number | Yes | Per-capita prey growth with no predators present. |
| aPred | number | Yes | Removal of prey per encounter — multiplies N·P. |
| bConv | number | Yes | New predators produced per prey consumed — sets the prey level needed to sustain predators (N* = m/b). |
| mPred | number | Yes | Per-capita predator death rate with no prey. |
| n0 | number | Yes |
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-lotka-volterra-predator-prey": {
"name": "lotka-volterra-predator-prey",
"description": "RK4 simulation of the classic predator–prey oscillator with phase plane, closed orbits, equilibrium, and period analysis.",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=lotka-volterra-predator-prey",
"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": "lotka-volterra-predator-prey",
"arguments": {
"rPrey": 0.5,
"aPred": 0.01,
"bConv": 0.01,
"mPred": 0.4,
"n0": 60,
"p0": 30,
"tMax": 60
}
}
}Questions or issues? Contact [email protected]
| Starting prey population — sets the orbit amplitude together with P₀. |
| p0 | number | Yes | Starting predator population. |
| tMax | number | Yes | How long to integrate — a few cycle periods (T ≈ 2π/√(r·m)) make the orbit readable. |
HTML result
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}