Health
按 Verhulst 模型 N_t = K/(1+((K−N₀)/N₀)·e^(−rt)) 计算受环境容纳量约束的种群增长:N ≪ K 时近似指数增长,N → K 时减速,N₀ > K 时回落至 K。同时给出瞬时增长率 dN/dt = r·N·(1−N/K)(在 N = K/2 处最大)与当前占容纳量的百分比。r 与 t 须使用相同时间单位,经典模型要求 r > 0;N ≪ K 时结果收敛于指数模型。
用三种语言从你的代码中调用此工具。
curl -X POST 'http://127.0.0.1:3003/zh/api/tools/logistic-growth-calculator' \
-H 'Content-Type: application/json' \
-d '{"n0":100,"k":10000,"r":0.5,"t":10,"decimalPlaces":2}'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST http://127.0.0.1:3003/zh/api/tools/logistic-growth-calculator| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| n0 | number | 是 | Population size at t = 0 (cells, individuals, biomass — any unit). |
| k | number | 是 | Maximum sustainable population under the available resources. |
| r | number | 是 | Per-capita rate in unlimited conditions; must be > 0. |
| t | number | 是 | Time elapsed in the same unit as r. |
| decimalPlaces | number | 否 | — |
将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。
将以下内容加入你的 MCP 客户端配置:
{
"mcpServers": {
"elysiatools-logistic-growth-calculator": {
"name": "logistic-growth-calculator",
"description": "按 Verhulst 模型 N_t = K/(1+((K−N₀)/N₀)·e^(−rt)) 计算受环境容纳量约束的种群增长:N ≪ K 时近似指数增长,N → K 时减速,N₀ > K 时回落至 K。同时给出瞬时增长率 dN/dt = r·N·(1−N/K)(在 N = K/2 处最大)与当前占容纳量的百分比。r 与 t 须使用相同时间单位,经典模型要求 r > 0;N ≪ K 时结果收敛于指数模型。",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=logistic-growth-calculator",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}连接到 SSE 端点后,列出已开放的工具:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}通过工具 id 调用,参数由其参数表构建:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "logistic-growth-calculator",
"arguments": {
"n0": 100,
"k": 10000,
"r": 0.5,
"t": 10,
"decimalPlaces": 2
}
}
}有问题或反馈?请联系 [email protected]
JSON 结果
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}