Skip to main content
Glama
Canada's Food Guide MCP Server

Canada's Food Guide MCP Server

Calculate Dri From Eer

calculate_dri_from_eer

Convert daily EER energy requirements into personalized macronutrient gram targets using AMDR ranges. Produces minimum, maximum, and mid-range goals for meal planning.

Instructions

Calculate specific macronutrient targets based on EER energy requirements and AMDR ranges.

This tool integrates EER (Energy Requirement) calculations with DRI macronutrient distribution recommendations to provide personalized daily macronutrient targets in grams. Perfect for complete meal planning workflows that start with energy needs.

CRITICAL WORKFLOW INTEGRATION: This tool provides structured data for calculations. ALWAYS use simple_math_calculator for ALL arithmetic operations:

  • Carb grams: simple_math_calculator(expression="(kcal * percent) / 4", variables=from_this_tool)

  • Protein grams: simple_math_calculator(expression="(kcal * percent) / 4", variables=from_this_tool)

  • Fat grams: simple_math_calculator(expression="(kcal * percent) / 9", variables=from_this_tool)

  • Range validation: simple_math_calculator(expression="actual_percent - target_percent", variables=from_this_tool)

Integration workflow:

  1. Calculate EER using get_eer_equations + simple_math_calculator

  2. Store user profile with store_dri_user_profile_in_session

  3. Use this tool to convert energy to macronutrient targets

  4. Use targets for meal planning and recipe analysis

Calculation approach:

  • Uses AMDR ranges to distribute total energy across macronutrients

  • Provides minimum and maximum gram targets for each macronutrient

  • Includes mid-range targets for practical meal planning

  • Accounts for different caloric densities (carb/protein: 4 kcal/g, fat: 9 kcal/g)

Use this tool when:

  • Converting EER energy requirements to practical macronutrient goals

  • Creating personalized meal planning targets

  • Building comprehensive nutrition analysis workflows

  • Developing nutrition counseling applications

  • Educational demonstrations of energy-to-macro conversion

Input Schema

NameRequiredDescriptionDefault
age_rangeYesAge range for AMDR lookup (e.g., "19 years and over", "1-3 years")
session_idYesVirtual session with cached DRI data and user profile
profile_nameYesStored user profile name for demographic reference
eer_energy_kcalYesTotal daily energy requirement in kilocalories (from EER calculations)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry behavioral disclosure, and it partially does: it explains the AMDR-based distribution, that min/max and mid-range gram targets are produced, and the 4/9 kcal-per-gram densities used. It never states that the operation is read-only with no persistent side effects, nor what happens when the session lacks cached DRI data or the profile name is unknown.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded, but roughly half the text is boilerplate: a four-line simple_math_calculator recipe block, a redundant workflow list, and a five-item 'when to use' list that largely restates the opening. The prescribed arithmetic formulas also duplicate what the tool itself reportedly returns, adding noise rather than clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value detail is unnecessary, and all parameters are documented. What remains missing is failure behavior for missing session/profile data and whether age_range must be consistent with the stored profile — meaningful but modest gaps for a calculation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so all four parameters are already documented, and the description adds no further semantics for session_id, profile_name, eer_energy_kcal, or age_range beyond the obvious linkage to AMDR lookup. Baseline 3 applies since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: converting EER energy requirements plus AMDR ranges into daily macronutrient gram targets. That clearly separates it from siblings like get_amdrs, get_eer_equations, and get_macronutrient_dri_tables, which supply inputs rather than the conversion itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit five-item 'Use this tool when' list plus a numbered integration workflow that names the alternatives (get_eer_equations, store_dri_user_profile_in_session, simple_math_calculator). However, there is no when-not guidance, and the instruction that ALL arithmetic must go through simple_math_calculator is confusing since the tool claims to return gram targets itself.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.