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

Canada's Food Guide MCP Server

Search And Get Cnf Macronutrients

search_and_get_cnf_macronutrients

Search Canadian Nutrient File foods by name and retrieve core macronutrient data for recipe nutrition analysis. Returns single-match data or multiple food options.

Instructions

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:

  • Discover CNF foods matching ingredient names from recipes

  • Retrieve core macronutrient data for immediate nutrition analysis

  • Identify available food options when multiple matches exist

  • Prepare data for recipe nutrition calculations

The tool returns different outputs based on search results:

  • Single match: Complete macronutrient data stored in session tables

  • Multiple matches: List of food options with codes for selection

  • No matches: Error message with search suggestions

Input Schema

NameRequiredDescriptionDefault
input_dataYesContains food_name (search term), session_id (storage identifier), optional preferred_units (serving size filter), and max_results (limit)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A3.7/5.0
Behavior4/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. It does so well for outcomes: it spells out three result branches (single match with data written to session tables, multiple matches returning a selectable option list, no matches returning an error with suggestions). It does not state permission or auth needs, whether access is rate-limited, or that the only side effect is session storage, leaving those gaps against a zero-annotation baseline.

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

Conciseness4/5

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

The definition is front-loaded with purpose, then usage bullets, then output branches, which makes it scannable. However, some content is filler, such as 'while maintaining compatibility with session-based storage', and the output section duplicates what the output schema already provides.

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?

The tool is moderately complex: a nested input object, session storage, and branching returns. The definition covers the search semantics, the three return modes, and the session side effect, so an agent could call it correctly. The remaining gaps are the relationship to the sibling lookup tools and the distinction between read-only and write behavior.

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%, and the nested object documents food_name, session_id, max_results, and preferred_units in detail. The description adds no detail on search syntax, such as partial-name matching or case sensitivity, and no guidance on how max_results and preferred_units affect the output. The baseline of 3 is appropriate.

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

Purpose4/5

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

It names a specific verb and resource pair: 'Search Canadian Nutrient File foods and retrieve core macronutrient data.' The scope, which is 13 core macronutrients, is also stated. However, it does not distinguish this tool from close siblings such as get_cnf_macronutrients_only and bulk_get_cnf_macronutrients, so an agent must infer the boundary.

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

Usage Guidelines3/5

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

The 'Use this tool to' bullets imply several situations in which it fits: discovering CNF foods from recipe ingredients, getting quick macros, and surfacing options. However, they state only positive cases and give no 'when not to use' rule or explicit alternatives, which matters because bulk_ and _only variants exist for multi-food and by-code lookups.

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