Elysia Tools Docs
EN
Language
ZHESPTRUFRDEEN
Back to site
Browse tools

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.

json· JSON resultOpen tool

Quick start

Call this tool from your code in three languages.

cURL
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

HTTP
POST https://api.elysiatools.com/en/api/tools/tpn-macronutrient-calculator

Parameters

NameTypeRequiredDescription
weightnumberYesPatient weight in kg — used for per-kg kcal, protein, glucose-infusion-rate and lipid ceilings.
dextrosePercentnumberYesDextrose concentration % w/v. D25W = 25 g/100 mL.
dextroseVolumenumberYesTotal dextrose volume (mL).
aaPercentnumberYesAmino-acid concentration % w/v. AA 8.5% = 8.5 g/100 mL.
aaVolumenumber

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:

mcp.json
{
  "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:

tools/list
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list"
}

Call this tool

Invoke the tool by its id, passing arguments built from its parameters:

tools/call
{
  "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
}
  }
}
Browse toolsOpen tool

© 2026 Elysia Tools. Developer documentation.

Back to siteBrowse tools
Yes
Total amino-acid volume (mL).
lipidEmulsionselectYes—
lipidVolumenumberYesTotal lipid emulsion volume (mL).
decimalPlacesnumberNo—

Response format

JSON result

JSON
{
  "key": {...},
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
Chain multiple tools in one session with a comma-separated toolId list, e.g. /mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp (max 20).

Questions or issues? Contact [email protected]