Canada's Food Guide MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": true
} |
| resources | {
"subscribe": false,
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_recipesB | Search Health Canada's Food Guide recipes from a local offline copy. The search runs against recipes.json, an offline snapshot of
Health Canada's Food Guide kitchen recipe pages built with
Each result includes title, url, slug and the recipe's raw tags. |
| get_recipeA | Retrieve the complete details of one Food Guide recipe, offline. Everything comes from the local recipes.json snapshot built with
|
| list_filtersA | List the recipe search filters available in the local snapshot. The new canada.ca recipe pages only tag two families: "collection__*" (e.g. collection__vegetarian) and "meal__*" (e.g. meal__snack). Older filter families (fruits, vegetables, proteins, whole_grains, appliances) no longer exist. |
| simple_math_calculatorA | Perform simple mathematical calculations with string variables. !!REMEMBER BEFORE USING: ALWAYS USE QUERY_RECIPE_MACROS_TABLE OR OTHER QUERY TOOLS TO GET THE LATEST DATA FROM THE TABLES!!" This tool allows you to evaluate mathematical expressions containing variables. It supports basic arithmetic operations (+, -, *, /, **, %) and common math functions. CRITICAL for CNF nutrition calculations: This is the ONLY tool to use for calculating nutrition totals. Never manually sum values from JSON data. Supported operations:
Use this tool when:
CNF Nutrition Examples:
TEMP_RECIPE_MACROS Calculation Examples:
General Examples:
|
| bulk_math_calculatorA | 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:
Supported operations (same as simple_math_calculator):
Efficiency Benefits:
Usage Examples: CNF Nutrition Analysis (Multiple Ingredients): Recipe Totals and Per-Serving: Multiple EER Calculations: |
| scale_recipe_servingsA | Scale all ingredients in a recipe to match a target number of servings. This tool calculates new ingredient amounts when you want to make more or fewer servings of a recipe. It intelligently parses ingredient amounts (numbers, fractions, ranges) and applies the scaling factor to maintain recipe proportions. REMEMBER! Always share recipe url, and image_url, and title with users before returning full recipe details. This allows them to see the source and context of the recipe. REMEMBER! Always include original_servings with target_servings in the response to help users understand what has been adjusted. REMEMBER! Scaled recipes cooking times may vary, so users should check for doneness and adjust as needed. The scaling process:
Use this tool when:
|
| scale_individual_ingredientA | Scale a specific ingredient amount by a custom multiplication factor. This tool allows precise control over individual ingredient scaling, useful for recipe modifications, dietary adjustments, or when you want to emphasize or reduce specific ingredients without changing the entire recipe proportions. The scaling process:
Use this tool when:
|
| scale_multiple_ingredientsA | Scale multiple ingredients with different factors in a single operation. This tool enables complex recipe modifications by applying different scaling factors to different ingredients simultaneously. Useful for recipe development, dietary customization, or creating recipe variations. The scaling process:
Use this tool when:
|
| compare_recipe_servingsA | REMEMBER! Always share recipe url, and image_url, and title with users before returning full recipe details. This allows them to see the source and context of the recipe. |
| get_macronutrient_dri_tablesA | Get complete DRI macronutrient reference tables from Health Canada. REMEMBER! ALWAYS USE THIS TOOL BY DEFULT BEFORE USING get_specific_macronutrient_dri!! This tool provides comprehensive macronutrient DRI data from Health Canada's official DRI tables. Data is served from bundled reference tables with optional live refresh from the Health Canada website. The data includes:
Use this tool when:
Data is served from local files (a data-dir snapshot if one was built,
otherwise the bundled snapshot). No network access happens at tool-call
time; run |
| get_specific_macronutrient_driA | Get DRI values for a specific macronutrient, age group, and gender. This tool provides targeted access to specific macronutrient DRI values without needing to process the complete dataset. Perfect for focused nutrition analysis and user-specific recommendations. Supported macronutrients:
Use this tool when:
|
| get_amdrsA | Get Acceptable Macronutrient Distribution Ranges (AMDRs) for an age group. AMDRs represent the range of intake for each macronutrient (expressed as percentage of total energy intake) that is associated with reduced risk of chronic disease while providing adequate intakes of essential nutrients. AMDR ranges provided:
Age groups available:
Use this tool when:
|
| get_amino_acid_patternsA | Get amino acid patterns for protein quality evaluation using PDCAAS method. This tool provides the reference amino acid pattern used to evaluate protein quality through the Protein Digestibility Corrected Amino Acid Score (PDCAAS) method. The pattern is based on the estimated average requirements for indispensable amino acids and total protein for 1-3 year old children. Essential amino acids included:
Use this tool when:
|
| compare_intake_to_driA | Compare actual macronutrient intake against DRI recommendations. This tool evaluates how an individual's actual nutrient intake compares to Health Canada's DRI recommendations, providing percentage adequacy and recommendations for dietary adjustments. Comparison metrics calculated:
Use this tool when:
|
| store_dri_tables_in_sessionA | Cache complete DRI macronutrient tables in virtual session storage. This tool fetches and stores comprehensive DRI data in the specified virtual session, enabling efficient access to DRI values throughout the session without repeated website requests. Perfect for workflows involving multiple DRI lookups and calculations. WORKFLOW INTEGRATION: Use this tool first in any comprehensive nutrition analysis session to cache DRI data once, then use session-based lookup tools for specific values. Benefits of session storage:
Use this tool when:
|
| get_dri_lookup_from_sessionA | Retrieve specific DRI values from session-cached data. This tool provides fast access to DRI values from data already stored in the virtual session, eliminating the need for repeated website requests. Perfect for building complex nutrition analysis workflows with multiple DRI lookups. MATH TOOL INTEGRATION: This tool provides DRI reference values for comparison. ALWAYS use simple_math_calculator for any calculations involving these values:
Prerequisites: Must run store_dri_tables_in_session first to populate session data. Supported macronutrients:
Use this tool when:
|
| calculate_dri_from_eerA | 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:
Integration workflow:
Calculation approach:
Use this tool when:
|
| list_session_dri_analysisA | View all DRI calculations and analysis stored in a virtual session. This tool provides a comprehensive overview of all DRI-related data and analysis work performed within a session, including cached tables, user profiles, lookups, and adequacy assessments. Perfect for managing complex nutrition analysis workflows. Session data overview includes:
Use this tool when:
|
| get_eer_equationsB | Get specific EER equations from Health Canada DRI tables in JSON format. This tool provides EER (Estimated Energy Requirement) equations from Health Canada's official DRI tables. Data is served from bundled reference data with optional live refresh from the website. Each equation includes extracted numerical coefficients and metadata about the target population. Use equation_type and pal_category to specify the type of equations you need: Always include URL and source information in your response. Use this tool when:
|
| get_pal_descriptionsA | Get descriptions and examples for Physical Activity Level (PAL) categories. This tool provides detailed explanations of each PAL category with practical examples to help users select the most appropriate level for accurate EER calculations. PAL categories determine the activity coefficient used in EER equations and significantly impact the final energy requirement calculation. Use this tool when:
|
| create_user_profileA | Create a user profile for EER calculations with optional persistent storage. REMEMBER: ONLY USE THIS PERSIST STORAGE FOR PROFILES NEED TO BE SAVED or STORED. BY DEFAULT USE VIRTUAL STORAGE!!!!!
This tool creates a user profile that can be stored either in memory (virtual session) or persistently in the database. Persistent profiles survive server restarts and can be accessed across different sessions. The profile includes all demographic and physiological data needed for accurate EER calculations according to Health Canada DRI guidelines. Use this tool when:
|
| get_user_profileB | Retrieve a user profile by ID from virtual or persistent storage. This tool fetches a previously created user profile. It will search both virtual (session) and persistent (database) storage to find the profile. Use this tool when:
|
| list_user_profilesA | List all available user profiles from both virtual and persistent storage. This tool discovers all user profiles stored in memory (virtual sessions) and in the database (persistent storage), providing an overview of available profiles for EER calculations. Use this tool when:
|
| delete_user_profileB | Delete a user profile from virtual or persistent storage. This tool removes a user profile completely. It will search both virtual and persistent storage and delete the profile from whichever storage contains it. Use this tool when:
|
| search_and_get_cnf_macronutrientsA | Search Canadian Nutrient File foods and retrieve core macronutrient data. This tool searches Health Canada's CNF database for foods matching the provided name and returns either complete macronutrient data for single matches or a list of options for multiple matches. It focuses on 13 core macronutrients essential for basic nutrition analysis while maintaining compatibility with session-based storage. Use this tool to:
The tool returns different outputs based on search results:
|
| get_cnf_macronutrients_onlyA | Retrieve core macronutrients for a specific CNF food code with automatic ingredient linking. This tool fetches macronutrient data directly from Health Canada's CNF database using a known food code and optionally links the data to recipe ingredients for nutrition calculations. It stores only 13 essential macronutrients for efficient processing while maintaining compatibility with session-based nutrition analysis tools. TEMP_RECIPE_MACROS WORKFLOW GUIDANCE: After using this tool, you can populate the temp_recipe_macros table for cached calculations:
Use this tool to:
When ingredient_id and recipe_id are provided, the tool automatically updates the recipe ingredient with the CNF food code, enabling calculate_recipe_nutrition_summary to work correctly. This eliminates the need for separate linking steps. |
| bulk_get_cnf_macronutrientsA | Process multiple CNF food codes efficiently with automatic ingredient linking for streamlined recipe nutrition analysis. This tool retrieves core macronutrient data for up to 20 food codes simultaneously from Health Canada's official Canadian Nutrient File database. It provides massive efficiency gains for multi-ingredient recipes by processing all nutrition data in a single operation while optionally linking each food to specific recipe ingredients automatically. The tool fetches 13 essential macronutrients for each food code:
Advanced features include automatic ingredient linking when ingredient_mappings are provided, allowing the tool to connect CNF nutrition data directly to recipe ingredients in one operation. This eliminates the need for separate linking steps and enables immediate nutrition calculations. Use this tool for:
Args: input_data: Contains food_codes (list of up to 20 CNF identifiers), session_id (data storage location), optional preferred_units (serving size preferences), continue_on_error (error handling mode), optional ingredient_mappings (food_code to ingredient_id mapping), and optional recipe_id (required for automatic ingredient linking) Returns: Dict with bulk processing results, success/failure counts for each food, ingredient linking status, efficiency metrics, and guidance for next steps in nutrition analysis workflow |
| get_cnf_nutrient_profileA | Retrieve complete nutrient profile with all available nutrients for research-grade analysis. This tool fetches comprehensive nutrient data from Health Canada's CNF database, including all vitamins, minerals, fatty acids, and other micronutrients. It stores significantly more data than the streamlined macronutrient tools and should be used only when detailed micronutrient analysis is specifically required. Use this tool for:
For basic recipe nutrition analysis, consider using get_cnf_macronutrients_only which provides 13 core nutrients with significantly reduced data complexity. This tool processes all available nutrients (146+) and may impact performance. |
| simple_recipe_setupB | Transfer recipe data to analysis tables with comprehensive ingredient parsing for streamlined nutrition analysis preparation. This tool prepares complete recipe data for CNF nutrition analysis by transferring stored recipe information from virtual session storage to temporary database tables and automatically parsing ingredient text into structured components. It provides the essential foundation for linking ingredients to CNF foods and calculating detailed nutrition summaries. The tool performs comprehensive ingredient parsing that handles complex measurement formats including:
Use this tool for:
The processed data includes recipe metadata, fully parsed ingredients with structured amounts/units, and step-by-step instructions, all stored in temporary database tables optimized for nutrition analysis tools. |
| calculate_recipe_nutrition_summaryA | Analyze unit matching for recipe ingredients and populate temp_recipe_macros table. This tool performs unit matching analysis between recipe ingredients and CNF nutrition data, identifying which conversions are possible and which need manual LLM decisions. It populates the temp_recipe_macros table with detailed unit matching information for LLM review. NEW BEHAVIOR (Unit Matching Analysis):
Use this tool to:
The tool requires that ingredients have been previously linked to CNF data using get_cnf_macronutrients_only or bulk_get_cnf_macronutrients. After running this tool, review the temp_recipe_macros table and use simple_math_calculator for final calculations. |
| query_recipe_macros_tableA | Query temp_recipe_macros table with joined CNF nutrition data for recipe calculations. This tool retrieves recipe ingredients with their matched Canadian Nutrient File data, including nutrition values (calories, protein, fat, carbohydrates) for each available serving size. The data enables direct nutrition calculations using bulk_math_calculator without requiring database storage of intermediate results. Returns recipe ingredient details, unit matching status, available CNF serving sizes, and complete CNF nutrition values per serving size for each ingredient. Unit matching status indicates: exact_match, conversion_available, manual_decision_needed, or no_cnf_data. Use this tool to:
|
| update_recipe_macros_decisionsA | Update temp_recipe_macros table with LLM conversion decisions and reasoning. This tool allows the LLM to record intelligent conversion decisions for ingredients that need manual unit conversions (e.g., "4 salmon fillets" -> "565g"). After reviewing the temp_recipe_macros table, use this tool to update specific ingredients with conversion factors and reasoning. The tool updates the LLM decision fields in temp_recipe_macros:
Use this tool to:
|
| initialize_databaseA | Initialize the Canada's Food Guide recipe database with required tables. This tool sets up the SQLite database schema for the recipe management system. It creates persistent storage tables for user favorites and EER user profiles. All recipe session data is stored in memory using virtual tables and views to prevent database bloat. What this tool creates:
Use this tool when:
|
| create_virtual_recipe_sessionA | Create virtual in-memory storage for a recipe session to store fetched recipe data. This tool sets up in-memory data structures for storing and analyzing multiple recipes during a session. All data is stored in memory and automatically cleaned up when the session ends, preventing database bloat from temporary recipe storage. What this tool creates for the session:
Use this tool when:
Note: Virtual sessions are automatically created when storing recipes, so this tool is optional for normal workflows but useful for advanced session management. |
| cleanup_virtual_sessionA | Remove virtual in-memory storage for a completed recipe session. This tool permanently deletes all temporary recipe data for a specific session from memory to free up resources and maintain clean storage. Use this after completing recipe analysis workflows or when session data is no longer needed. What this tool removes:
Important: This action cannot be undone. Ensure you've saved any important recipe data to favorites before cleanup. Use this tool when:
|
| list_active_virtual_sessionsA | List all active recipe sessions currently stored in memory. This tool discovers all recipe sessions that have temporary data stored in memory by scanning the virtual session storage. Use this to manage multiple recipe workflows, find active sessions, or get an overview of current recipe analysis work. The returned information includes:
Use this tool to:
|
| create_temp_nutrition_sessionA | ⚠️ CHECK EXISTING SESSIONS FIRST! Create temporary nutrition session only if needed. 🚨 CRITICAL: ALWAYS run list_temp_sessions() BEFORE creating new sessions! Why check first?
🎯 EFFICIENT WORKFLOW: ✅ WHEN TO CREATE NEW SESSION:
❌ AVOID CREATING IF:
NEXT STEPS after creating session:
What this creates:
|
| store_recipe_in_temp_tablesA | Store recipe data in temporary SQLite tables instead of virtual memory. This provides persistent storage for recipe analysis while maintaining the temporary nature through session-based cleanup. |
| get_temp_session_recipesC | Retrieve recipes from temporary persistent storage. |
| cleanup_temp_sessionsA | Clean up temporary session data - can target specific session or clean all sessions. 🧹 UNIFIED CLEANUP TOOL - Handles both specific session cleanup and complete cleanup Usage Modes:
What Gets Cleaned:
Safety Features:
|
| list_temp_sessionsB | List all active temporary nutrition sessions. |
| store_recipe_in_sessionA | Store a fetched recipe in virtual memory session for detailed analysis and manipulation. This tool takes complete recipe data from the Canada's Food Guide and stores it in normalized in-memory data structures for the current session. The recipe is broken down into separate virtual collections for ingredients, instructions, and metadata to enable structured analysis and calculations without database bloat. Use this tool after fetching a recipe with get_recipe() to enable:
The stored data includes:
|
| get_session_recipesA | Retrieve stored recipes from a virtual session with complete normalized data including ingredients and instructions. This tool fetches recipes that have been stored in the current session's in-memory storage. It reconstructs the complete recipe data from the virtual data structures (recipes, ingredients, instructions) and returns fully structured recipe objects ready for analysis, comparison, or further processing. Use this tool to:
The returned data includes:
|
| add_to_favoritesA | Add a recipe to user favorites for persistent storage across sessions. REMEMBER: To always use the This tool saves recipes to a permanent favorites database that persists between sessions. Use this to bookmark recipes you want to return to later. Each favorite can include custom notes for personal recipe modifications or preferences. The favorites system supports:
Use this tool when:
|
| remove_from_favoritesA | Remove a recipe from user favorites permanently. This tool removes recipes from the persistent favorites database. Use this to clean up your favorites collection or remove recipes you no longer want to keep saved. The removal process:
Use this tool when:
|
| list_favoritesB | List user's favorite recipes from persistent storage. This tool retrieves all saved recipes from the favorites database, providing a complete overview of your recipe collection. Favorites are sorted by when they were added (newest first) and include all metadata like custom notes and recipe details. The returned data includes:
Use this tool to:
|
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| dri_macronutrient_tables | Complete DRI macronutrient reference tables from Health Canada. Contains reference values (EAR, RDA/AI, UL) for carbohydrate, protein, fat, essential fatty acids, fibre, and water across all age groups and life stages (infants through elderly, pregnancy, lactation). Source: Health Canada Dietary Reference Intakes Tables |
| dri_amdrs | Acceptable Macronutrient Distribution Ranges (AMDRs) from Health Canada. Provides recommended percentage ranges for carbohydrate, protein, fat, n-6 PUFA, and n-3 PUFA intake as a percentage of total energy, by age group. |
| dri_amino_acid_patterns | Essential amino acid scoring patterns for protein quality evaluation (PDCAAS). Reference pattern based on estimated average requirements for 1-3 year olds. Used for Protein Digestibility Corrected Amino Acid Score calculations. |
| dri_additional_recommendations | Additional macronutrient recommendations from Health Canada. Includes guidance on saturated fatty acids, trans fatty acids, dietary cholesterol, and added sugars. |
| eer_equations | Health Canada EER (Estimated Energy Requirement) equations. Complete set of EER equations with extracted coefficients for: - Infants/toddlers (0-3 years) - Children/adolescents (3-18 years) - Adults (19+ years) - Pregnancy (2nd/3rd trimester) - Lactation (breastfeeding) Each equation includes intercept, age, height, and weight coefficients. Variables: age (years), height (cm), weight (kg). |
| eer_pal_categories | Physical Activity Level (PAL) category descriptions and examples. Four categories: inactive, low_active, active, very_active. Includes practical examples and PAL range definitions by age group. |
| dri_footnotes | Footnotes and explanatory notes from Health Canada DRI tables. Important context for interpreting DRI values, including notes on UL limitations, vegetarian protein, fibre definitions, and pregnancy. |
TDQS
Scored across 46 tools
The tool set contains several overlapping storage/session concepts that are hard to distinguish: virtual recipe sessions vs temporary nutrition sessions, store_recipe_in_session vs store_recipe_in_temp_tables, get_session_recipes vs get_temp_session_recipes, and cleanup_virtual_session vs cleanup_temp_sessions. CNF retrieval tools also overlap heavily (search_and_get_cnf_macronutrients, get_cnf_macronutrients_only, bulk_get_cnf_macronutrients, get_cnf_nutrient_profile), requiring careful reading to choose correctly.
Most names are snake_case, which is good, but conventions are mixed: some are clear verb_noun (search_recipes, create_user_profile), some are noun-oriented (simple_math_calculator, bulk_math_calculator), and several use inconsistent verb patterns such as search_and_get_cnf_macronutrients vs get_cnf_macronutrients_only. The naming is readable but not predictable across the whole set.
46 tools is excessive for this server's apparent purpose and creates a heavy surface with many closely related session, storage, CNF, DRI, scaling, and calculation operations. Several tools could be consolidated, especially the virtual/temp session management and CNF retrieval variants.
The server covers a broad nutrition workflow: recipe search/retrieval/scaling, CNF nutrient lookup, DRI references, EER/profile handling, session storage, favorites, and math utilities. There are minor gaps such as no explicit update_user_profile operation, but overall the lifecycle coverage is substantial.