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

Canada's Food Guide MCP Server

Update Recipe Macros Decisions

update_recipe_macros_decisions

Records LLM conversion decisions, factors, and reasoning for recipe ingredients that need manual unit conversions, enabling accurate nutrition calculations and an audit trail.

Instructions

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:

  • llm_conversion_decision: Human-readable conversion (e.g., "4 fillets = 565g")

  • llm_conversion_factor: Calculated factor for nutrition math (e.g., 5.65 for 565g/100g)

  • llm_reasoning: LLM's reasoning for the conversion estimate

Use this tool to:

  • Record conversion decisions for manual_decision_needed ingredients

  • Document reasoning for conversion estimates

  • Prepare data for final nutrition calculations with simple_math_calculator

  • Build transparent audit trail of conversion decisions

Input Schema

NameRequiredDescriptionDefault
input_dataYesContains session_id, ingredient_id, conversion decision, factor, and reasoning

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It discloses that this is a mutation of specific decision fields and frames it as building a 'transparent audit trail', which is useful. However, it never says whether repeated calls overwrite or append prior decisions, what happens with an invalid session_id/ingredient_id, or whether the whole row must already exist.

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 purpose and the workflow trigger are front-loaded in the first sentences, and bullets make the usage list scannable. There is noticeable redundancy: the three-field bullet list largely restates the schema descriptions, and the 'Use this tool to' list partially repeats the opening paragraph, so it could be tighter.

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 values need no explanation, and the workflow position, target table, and written fields are all covered. The remaining gap is update semantics (overwrite vs. accumulate, validation of session/ingredient IDs) which matters for a mutation tool with zero annotation coverage.

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 the schema already documents session_id, ingredient_id and the three decision fields with the same examples ('565g/100g', '4 fillets = 565g'). The description adds only the framing that the factor is for 'nutrition math', which is marginal value over structured data. Baseline 3 applies.

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 names a specific verb and resource ('Update temp_recipe_macros table') and immediately scopes it to LLM conversion decisions plus reasoning, so an agent can distinguish it from query_recipe_macros_table (read) and simple_math_calculator (downstream math). It also enumerates the exact fields being written, which pins down the tool's effect.

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 precondition ('After reviewing the temp_recipe_macros table') and a bulleted when-to-use list tied to 'manual_decision_needed ingredients', plus the downstream handoff to simple_math_calculator. It stops short of naming a tool to use instead when a conversion is trivial or automatic, so there is no explicit exclusion rule.

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