Education
Expected heterozygosity loss through a population bottleneck: H_final = H₀(1−1/2Nb)^t(1−1/2Nr)^g, retention, inbreeding F, harmonic-mean Ne, and one-generation allele survival. Derived from Wright 1931, Nei et al. 1975, Hartl & Clark 2007, StatPearls. Educational use only.
Call this tool from your code in three languages.
curl -X POST 'http://127.0.0.1:3003/en/api/tools/bottleneck-effect-simulator' \
-H 'Content-Type: application/json' \
-d '{"initialHeterozygosity":0.5,"bottleneckSize":20,"bottleneckGenerations":5,"recoverySize":2000,"recoveryGenerations":10,"alleleFrequency":0.1,"decimalPlaces":4}'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/bottleneck-effect-simulator| Name | Type | Required | Description |
|---|---|---|---|
| initialHeterozygosity | number | Yes | Heterozygosity before the bottleneck (0 < H₀ ≤ 1). |
| bottleneckSize | number | Yes | Census size during the bottleneck (Nb). |
| bottleneckGenerations | number | Yes | Number of generations spent at the bottleneck size (t). |
| recoverySize | number | Yes | Census size after recovery (Nr). |
| recoveryGenerations | number |
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-bottleneck-effect-simulator": {
"name": "bottleneck-effect-simulator",
"description": "Expected heterozygosity loss through a population bottleneck: H_final = H₀(1−1/2Nb)^t(1−1/2Nr)^g, retention, inbreeding F, harmonic-mean Ne, and one-generation allele survival. Derived from Wright 1931, Nei et al. 1975, Hartl & Clark 2007, StatPearls. Educational use only.",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=bottleneck-effect-simulator",
"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": "bottleneck-effect-simulator",
"arguments": {
"initialHeterozygosity": 0.5,
"bottleneckSize": 20,
"bottleneckGenerations": 5,
"recoverySize": 2000,
"recoveryGenerations": 10,
"alleleFrequency": 0.1,
"decimalPlaces": 4
}
}
}| Generations spent at the recovery size (g; 0 to skip). |
| alleleFrequency | number | Yes | Frequency p of a focal allele used for the one-generation bottleneck survival estimate. |
| decimalPlaces | number | No | — |
JSON result
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Questions or issues? Contact [email protected]