Health
Calculate glucose/amino-acid/lipid delivery (grams and kcal), total and non-protein calories, the non-protein kcal:g nitrogen ratio and per-kg values from a parenteral nutrition prescription. Energy densities: dextrose 3.4 kcal/g, AA 4.0 kcal/g, lipid 20% ≈ 2.0 kcal/mL. Targets (ASPEN/ESPEN): 20–30 kcal/kg/day, protein 1.0–1.5 g/kg/day. This is a prescription-analysis aid, not a compounding recipe. Derived from ASPEN 2016, ESPEN 2019, McClave 2016, Mirtallo 2004. Not medical advice.
Call this tool from your code in three languages.
curl -X POST 'http://127.0.0.1:3003/en/api/tools/tpn-macronutrient-calculator' \
-H 'Content-Type: application/json' \
-d '{"weight":70,"dextrosePercent":25,"dextroseVolume":1000,"aaPercent":8.5,"aaVolume":500,"lipidEmulsion":"20%","lipidVolume":250,"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/tpn-macronutrient-calculator| Name | Type | Required | Description |
|---|---|---|---|
| weight | number | Yes | Patient weight in kg — used for per-kg kcal, protein, glucose-infusion-rate and lipid ceilings. |
| dextrosePercent | number | Yes | Dextrose concentration % w/v. D25W = 25 g/100 mL. |
| dextroseVolume | number | Yes | Total dextrose volume (mL). |
| aaPercent | number | Yes | Amino-acid concentration % w/v. AA 8.5% = 8.5 g/100 mL. |
| aaVolume | 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-tpn-macronutrient-calculator": {
"name": "tpn-macronutrient-calculator",
"description": "Calculate glucose/amino-acid/lipid delivery (grams and kcal), total and non-protein calories, the non-protein kcal:g nitrogen ratio and per-kg values from a parenteral nutrition prescription. Energy densities: dextrose 3.4 kcal/g, AA 4.0 kcal/g, lipid 20% ≈ 2.0 kcal/mL. Targets (ASPEN/ESPEN): 20–30 kcal/kg/day, protein 1.0–1.5 g/kg/day. This is a prescription-analysis aid, not a compounding recipe. Derived from ASPEN 2016, ESPEN 2019, McClave 2016, Mirtallo 2004. Not medical advice.",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=tpn-macronutrient-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": "tpn-macronutrient-calculator",
"arguments": {
"weight": 70,
"dextrosePercent": 25,
"dextroseVolume": 1000,
"aaPercent": 8.5,
"aaVolume": 500,
"lipidEmulsion": "20%",
"lipidVolume": 250,
"decimalPlaces": 1
}
}
}| Total amino-acid volume (mL). |
| lipidEmulsion | select | Yes | — |
| lipidVolume | number | Yes | Total lipid emulsion volume (mL). |
| decimalPlaces | number | No | — |
JSON result
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Questions or issues? Contact [email protected]