Health
Calculate the osmolar gap (osmolal gap, OG) = measured serum osmolality − calculated osmolality. Calculated osmolality uses the conventional formula 2 × Na + Glucose/18 + BUN/2.8 (mg/dL) or the SI formula 2 × Na + Glucose + Urea (mmol/L). A normal OG is approximately −10 to +10 mOsm/kg. An elevated OG indicates unmeasured osmoles — ethanol; toxic alcohols (methanol, ethylene glycol, diethylene glycol, propylene glycol); mannitol, sorbitol, glycerol; severe DKA; sepsis/end-stage renal disease. An optional ethanol level computes the ethanol-corrected gap (OG_corr = OG − EtOH/4.6) to reveal a residual unmeasured osmole such as methanol or ethylene glycol. A normal OG does NOT exclude late-stage toxic-alcohol poisoning (the parent compound is metabolized to acids, raising the anion gap instead). Derived from Kraut 2024, Whittington 2009, and MDCalc. Interpret with anion gap, blood gas, and history. Not medical advice.
Call this tool from your code in three languages.
curl -X POST 'http://127.0.0.1:3003/en/api/tools/osmolar-gap-calculator' \
-H 'Content-Type: application/json' \
-d '{"unitSystem":"conventional","measuredOsm":330,"sodium":140,"glucose":110,"bunOrUrea":14,"ethanol":0,"decimalPlaces":1}'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/osmolar-gap-calculator| Name | Type | Required | Description |
|---|---|---|---|
| unitSystem | select | Yes | — |
| measuredOsm | number | Yes | Measured serum osmolality by freezing-point depression (mOsm/kg). |
| sodium | number | Yes | Serum sodium (mmol/L), always in mmol/L regardless of unit system. |
| glucose | number | Yes | Serum glucose. mg/dL under Conventional units, mmol/L under SI units. |
| bunOrUrea | number | Yes |
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-osmolar-gap-calculator": {
"name": "osmolar-gap-calculator",
"description": "Calculate the osmolar gap (osmolal gap, OG) = measured serum osmolality − calculated osmolality. Calculated osmolality uses the conventional formula 2 × Na + Glucose/18 + BUN/2.8 (mg/dL) or the SI formula 2 × Na + Glucose + Urea (mmol/L). A normal OG is approximately −10 to +10 mOsm/kg. An elevated OG indicates unmeasured osmoles — ethanol; toxic alcohols (methanol, ethylene glycol, diethylene glycol, propylene glycol); mannitol, sorbitol, glycerol; severe DKA; sepsis/end-stage renal disease. An optional ethanol level computes the ethanol-corrected gap (OG_corr = OG − EtOH/4.6) to reveal a residual unmeasured osmole such as methanol or ethylene glycol. A normal OG does NOT exclude late-stage toxic-alcohol poisoning (the parent compound is metabolized to acids, raising the anion gap instead). Derived from Kraut 2024, Whittington 2009, and MDCalc. Interpret with anion gap, blood gas, and history. Not medical advice.",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=osmolar-gap-calculator",
"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": "osmolar-gap-calculator",
"arguments": {
"unitSystem": "conventional",
"measuredOsm": 330,
"sodium": 140,
"glucose": 110,
"bunOrUrea": 14,
"ethanol": 0,
"decimalPlaces": 1
}
}
}| BUN in mg/dL under Conventional units, or serum urea in mmol/L under SI units. |
| ethanol | number | No | Serum ethanol in mg/dL. Optional; computes ethanol-corrected OG_corr = OG − EtOH/4.6. |
| decimalPlaces | number | No | — |
JSON result
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Questions or issues? Contact [email protected]