Health
TPN Macronutrient Calculator (Glucose/AA/Lipid)
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.
Quick start
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/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}'API reference
Send a POST request with your inputs as JSON. File parameters require a separate upload first.
Endpoint
POST https://api.elysiatools.com/en/api/tools/tpn-macronutrient-calculatorParameters
| 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 |
MCP integration
Add this tool to your Model Context Protocol server so AI agents can list and call it.
Server configuration
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": "https://api.elysiatools.com/mcp/sse?toolId=tpn-macronutrient-calculator",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}List available tools
After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Call this tool
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
}
}
}