Health
在渗透浓度单位之间互查换算:mOsm/L(渗透浓度)、mOsm/kg(重量渗透浓度)、mmol/L、mmol/kg。渗透摩尔按渗透活性粒子计数(mOsm = 解离因子 n × mmol,葡萄糖 n=1、NaCl n≈2、CaCl₂ n≈3),每升与每千克之间用溶液密度 ρ(kg/L,默认 1.000)桥接。参考:血清渗透压正常 275–295 mOsm/kg,0.9% NaCl(154 mmol/L,n=2)≈ 308 mOsm/L。不构成医疗建议。
用三种语言从你的代码中调用此工具。
curl -X POST 'http://127.0.0.1:3003/zh/api/tools/osmolarity-converter' \
-H 'Content-Type: application/json' \
-d '{"value":154,"fromUnit":"mmolPerL","toUnit":"mosmPerL","particles":2,"density":1,"decimalPlaces":2}'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST http://127.0.0.1:3003/zh/api/tools/osmolarity-converter| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| value | number | 是 | Concentration value in the From unit. Must be non-negative. |
| fromUnit | select | 是 | Unit of the entered value. |
| toUnit | select | 是 | Unit to convert the value into. |
| particles | number | 是 | Osmotically active particles per formula unit: glucose 1, NaCl ≈ 2, CaCl₂ ≈ 3. Only used when a mmol unit is involved. |
| density | number | 否 | Solution density bridging per-litre and per-kilogram units (dilute aqueous solutions ≈ 1.000 kg/L). |
将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。
将以下内容加入你的 MCP 客户端配置:
{
"mcpServers": {
"elysiatools-osmolarity-converter": {
"name": "osmolarity-converter",
"description": "在渗透浓度单位之间互查换算:mOsm/L(渗透浓度)、mOsm/kg(重量渗透浓度)、mmol/L、mmol/kg。渗透摩尔按渗透活性粒子计数(mOsm = 解离因子 n × mmol,葡萄糖 n=1、NaCl n≈2、CaCl₂ n≈3),每升与每千克之间用溶液密度 ρ(kg/L,默认 1.000)桥接。参考:血清渗透压正常 275–295 mOsm/kg,0.9% NaCl(154 mmol/L,n=2)≈ 308 mOsm/L。不构成医疗建议。",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=osmolarity-converter",
"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": "osmolarity-converter",
"arguments": {
"value": 154,
"fromUnit": "mmolPerL",
"toUnit": "mosmPerL",
"particles": 2,
"density": 1,
"decimalPlaces": 2
}
}
}有问题或反馈?请联系 [email protected]
| decimalPlaces | number | 否 | — |
JSON 结果
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}