Health
Convert mOsm/L ↔ mOsm/kg ↔ mmol/L ↔ mmol/kg using the dissociation factor n and solution density; includes the serum reference range 275–295 mOsm/kg. Not medical advice.
Call this tool from your code in three languages.
curl -X POST 'http://127.0.0.1:3003/en/api/tools/osmolarity-converter' \
-H 'Content-Type: application/json' \
-d '{"value":154,"fromUnit":"mmolPerL","toUnit":"mosmPerL","particles":2,"density":1,"decimalPlaces":2}'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/osmolarity-converter| Name | Type | Required | Description |
|---|---|---|---|
| value | number | Yes | Concentration value in the From unit. Must be non-negative. |
| fromUnit | select | Yes | Unit of the entered value. |
| toUnit | select | Yes | Unit to convert the value into. |
| particles | number | Yes | Osmotically active particles per formula unit: glucose 1, NaCl ≈ 2, CaCl₂ ≈ 3. Only used when a mmol unit is involved. |
| density | 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-osmolarity-converter": {
"name": "osmolarity-converter",
"description": "Convert mOsm/L ↔ mOsm/kg ↔ mmol/L ↔ mmol/kg using the dissociation factor n and solution density; includes the serum reference range 275–295 mOsm/kg. Not medical advice.",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=osmolarity-converter",
"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": "osmolarity-converter",
"arguments": {
"value": 154,
"fromUnit": "mmolPerL",
"toUnit": "mosmPerL",
"particles": 2,
"density": 1,
"decimalPlaces": 2
}
}
}Questions or issues? Contact [email protected]
| Solution density bridging per-litre and per-kilogram units (dilute aqueous solutions ≈ 1.000 kg/L). |
| decimalPlaces | number | No | — |
JSON result
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}