Education
Compute allele and expected genotype frequencies under Hardy-Weinberg equilibrium. Two modes: allele frequency or genotype counts with chi-square test. Derived from Hardy 1908, Weinberg 1908, Wigginton 2005, 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/hardy-weinberg-equilibrium' \
-H 'Content-Type: application/json' \
-d '{"mode":"frequency","qFreq":0.01,"aaCount":0,"AaCount":0,"AACount":0,"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/hardy-weinberg-equilibrium| Name | Type | Required | Description |
|---|---|---|---|
| mode | select | Yes | Choose allele-frequency mode or genotype-counts mode. |
| qFreq | number | No | Frequency of the recessive allele q (0–1). Used in frequency mode only. |
| aaCount | number | No | Observed count of genotype aa. Used in counts mode only. |
| AaCount | number | No | Observed count of genotype Aa. Used in counts mode only. |
| AACount | number | No |
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-hardy-weinberg-equilibrium": {
"name": "hardy-weinberg-equilibrium",
"description": "Compute allele and expected genotype frequencies under Hardy-Weinberg equilibrium. Two modes: allele frequency or genotype counts with chi-square test. Derived from Hardy 1908, Weinberg 1908, Wigginton 2005, StatPearls. Educational use only.",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=hardy-weinberg-equilibrium",
"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": "hardy-weinberg-equilibrium",
"arguments": {
"mode": "frequency",
"qFreq": 0.01,
"aaCount": 0,
"AaCount": 0,
"AACount": 0,
"decimalPlaces": 4
}
}
}Questions or issues? Contact [email protected]
| Observed count of genotype AA. Used in counts mode only. |
| decimalPlaces | number | No | — |
JSON result
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}