Health
Calculate the Urine Anion Gap (UAG) to differentiate causes of normal-anion-gap (hyperchloremic) metabolic acidosis: UAG = (U_Na + U_K) − U_Cl, in mmol/L. The UAG is an inverse surrogate for urinary NH₄⁺ excretion. A negative UAG (typically −20 to −50) indicates appropriate high NH₄⁺ excretion → extrarenal (GI) bicarbonate loss (diarrhea, fistulae, ureteral diversions). A positive/high UAG indicates low NH₄⁺ excretion → renal tubular acidosis (distal/type 1, type 4 hypoaldosteronism, proximal/type 2 variable). Reference range ≈ 0 to +40 mmol/L. Caveats: unreliable with unmeasured urine anions (ketoacidosis, toluene/hippurate, D-lactate) or when urine sodium < 25 mmol/L (use urine osmolar gap instead). Derived from Batlle CJASN 2012, Ito 2025, Bonner AJKD 2025. Interpret with blood gas and full clinical context. Not medical advice.
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/anion-gap-renal' \
-H 'Content-Type: application/json' \
-d '{"urineSodium":25,"urinePotassium":35,"urineChloride":120,"decimalPlaces":1}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/anion-gap-renal| Name | Type | Required | Description |
|---|---|---|---|
| urineSodium | number | Yes | Urine sodium U_Na (mmol/L). Must be ≥0. Reliability drops below 25 mmol/L. |
| urinePotassium | number | Yes | Urine potassium U_K (mmol/L). Must be ≥0. |
| urineChloride | number | Yes | Urine chloride U_Cl (mmol/L). Must be ≥0. |
| decimalPlaces | number | No | — |
JSON result
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}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-anion-gap-renal": {
"name": "anion-gap-renal",
"description": "Calculate the Urine Anion Gap (UAG) to differentiate causes of normal-anion-gap (hyperchloremic) metabolic acidosis: UAG = (U_Na + U_K) − U_Cl, in mmol/L. The UAG is an inverse surrogate for urinary NH₄⁺ excretion. A negative UAG (typically −20 to −50) indicates appropriate high NH₄⁺ excretion → extrarenal (GI) bicarbonate loss (diarrhea, fistulae, ureteral diversions). A positive/high UAG indicates low NH₄⁺ excretion → renal tubular acidosis (distal/type 1, type 4 hypoaldosteronism, proximal/type 2 variable). Reference range ≈ 0 to +40 mmol/L. Caveats: unreliable with unmeasured urine anions (ketoacidosis, toluene/hippurate, D-lactate) or when urine sodium < 25 mmol/L (use urine osmolar gap instead). Derived from Batlle CJASN 2012, Ito 2025, Bonner AJKD 2025. Interpret with blood gas and full clinical context. Not medical advice.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=anion-gap-renal",
"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": "anion-gap-renal",
"arguments": {
"urineSodium": 25,
"urinePotassium": 35,
"urineChloride": 120,
"decimalPlaces": 1
}
}
}Questions or issues? Contact [email protected]