calculate_macros
Split target daily calories into protein, carbohydrate and fat — grams and kcal. Protein is derived from body weight via the same LARN-sourced goal bands as /protein-requirement (larn/active/sport); fat is a % of calories (20-35); carbs are the remainder. Uses 4/4/9 kcal per gram. Errors if protein + fat already exceed the calorie target.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"calories": "<calories>",
"weight": "<weight>",
"unit": "<unit>",
"proteinGoal": "<proteinGoal>",
"fatPct": "<fatPct>"
},
"name": "calculate_macros"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| age | No | Age in years; >=60 raises the LARN protein reference to 1.10 g/kg | |
| unit | Yes | metric (kg) or imperial (lb) | |
| fatPct | Yes | Fat % of calories (20-35) | |
| weight | Yes | Body weight (kg or lb) | |
| calories | Yes | Target daily calories (kcal), e.g. from /tdee or /calorie-deficit | |
| proteinGoal | Yes | Protein target band (same as /protein-requirement): larn (LARN reference), active (1.2-1.6 g/kg) or sport (1.6-2.0 g/kg) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fatKcal | Yes | ||
| fatGrams | Yes | ||
| carbsKcal | Yes | ||
| carbsGrams | Yes | ||
| proteinKcal | Yes | ||
| proteinGrams | Yes |