Bulk Math Calculator
bulk_math_calculatorEvaluate multiple math expressions in one call to calculate nutrition values, scale recipes, and process batch totals, reducing repeated tool calls.
Instructions
Perform multiple mathematical calculations in a single operation.
!!REMEMBER BEFORE USING: ALWAYS QUERY_RECIPE_MACROS_TABLE OR OTHER QUERY TOOLS TO GET THE LATEST DATA FROM THE TABLES!!"
This tool allows you to evaluate multiple mathematical expressions in one call, eliminating the need for repeated tool calls when calculating nutrition data, recipe scaling, or any batch mathematical operations.
PERFECT for CNF nutrition calculations: Instead of calling simple_math_calculator multiple times for each ingredient, calculate all ingredient nutrition values at once.
Each calculation includes:
Unique ID for easy result identification
Mathematical expression with variables
Variable dictionary for that specific calculation
Supported operations (same as simple_math_calculator):
Basic arithmetic: +, -, *, /, ** (power), % (modulo)
Parentheses for grouping: (expression)
Variables: any valid Python identifier (letters, numbers, underscores)
Efficiency Benefits:
Reduces N tool calls to 1 tool call (3x-10x+ performance improvement)
Perfect for multi-ingredient nutrition analysis
Batch processing of recipe scaling calculations
Bulk EER calculations for multiple profiles
Usage Examples:
CNF Nutrition Analysis (Multiple Ingredients):
calculations: [
{"id": "honey_cals", "expression": "cnf_calories * conversion_factor",
"variables": {"cnf_calories": 22, "conversion_factor": 2}},
{"id": "salmon_cals", "expression": "cnf_calories * conversion_factor",
"variables": {"cnf_calories": 206, "conversion_factor": 5.65}},
{"id": "oil_cals", "expression": "cnf_calories * conversion_factor",
"variables": {"cnf_calories": 885, "conversion_factor": 0.1}}
]Recipe Totals and Per-Serving:
calculations: [
{"id": "total_calories", "expression": "honey + salmon + oil",
"variables": {"honey": 44, "salmon": 1164, "oil": 89}},
{"id": "per_serving", "expression": "total / servings",
"variables": {"total": 1297, "servings": 4}}
]Multiple EER Calculations:
calculations: [
{"id": "adult_male", "expression": "662 - (9.53 * age) + (15.91 * weight) + (539.6 * height)",
"variables": {"age": 30, "weight": 75, "height": 1.75}},
{"id": "adult_female", "expression": "354 - (6.91 * age) + (9.36 * weight) + (726 * height)",
"variables": {"age": 28, "weight": 65, "height": 1.65}}
]Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bulk_input | Yes | Contains list of calculations, each with id, expression, and variables |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||