Skip to main content
Glama
nutrition-mcp

nutrition-mcp

search_food

Read-onlyIdempotent

Find food IDs by name for use in other nutrition tools, including spelling variants and close-name suggestions when no match exists; verify the returned name or alias before using its ID.

Instructions

Find foods by name and get their ids. Call this first: the other food tools take ids from it. Spelling variants match (sambar, sambhar), but every word of the query has to match a word of one name, so a dish that is not in the data returns no results, a note saying so and up to 5 close names as suggestions. Check that a result's name or one of its aliases is the food asked for; when no result is, report the dish as missing instead of using a suggestion or another result in its place. Each result has its kind (dish or ingredient), regions, diet and units: the units get_nutrition and compute_meal accept for that food, with the grams in one of each. total counts every match before limit; when it is larger than the results shown, raise limit or narrow with region, diet or kind.

Input Schema

NameRequiredDescriptionDefault
dietNoKeep foods suitable for this diet: veg includes vegan.
kindNoKeep only dishes or only ingredients.
limitNo
queryYesA food name.
regionNoKeep dishes from this region. Ingredients have none, so leave it out with kind=ingredient.

Output Schema

NameRequiredDescriptionDefault
noteNoSet only when there are no results: says the food is not in the data and is to be reported as missing, not answered with a suggestion or another food, or, when a filter was given, to search again without it first.
queryYes
totalYes
resultsYes
suggestionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: explains spelling-variant matching (sambar/sambhar), the all-words-must-match token rule, that zero hits return a `note` plus up to 5 close-name suggestions, and that `total` counts pre-limit matches. It also names the result fields and, critically, that each food carries `units` with gram weights accepted by get_nutrition and compute_meal.

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?

Front-loads the identity and the 'call this first' instruction, then adds detail in priority order. The prose is dense and the second sentence is long and comma-chained, but nearly every clause carries operational information an agent needs.

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

Completeness5/5

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

Covers matching semantics, the empty-result contract, result field meanings, cross-tool unit compatibility, and pagination behavior — all the decision-relevant context for a search tool. An output schema exists, yet the description's explanation of `units`/grams adds genuinely useful cross-tool linkage rather than duplicating it.

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

Parameters4/5

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

Schema coverage is 80% and the individual params are already documented, but the description adds real semantics the schema lacks: the relationship between `total` and `limit` and the corrective actions (raise limit, narrow by region/diet/kind). It does not restate enum meanings, which is appropriate since the schema covers them.

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?

Opens with a specific verb+resource+payload: 'Find foods by name and get their ids.' It immediately positions itself relative to siblings by noting the other food tools take ids from it, so an agent knows this is the entry point rather than a nutrition or meal tool.

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?

Explicit sequencing guidance ('Call this first') plus concrete fallback instructions: when total exceeds shown results, raise limit or narrow by region/diet/kind, and when no result matches, report the dish missing rather than substituting a suggestion. The one gap is that the sibling `find_foods` is never mentioned, so an agent cannot tell how this differs from that similarly-named tool.

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