Skip to main content
Glama

Resolve ingredients

resolve_ingredients
Read-onlyIdempotent

Matches ingredient names to FoodData Central foods and converts portions to grams.

Portions such as 2 tbsp, 1/2 cup, or 1 medium are converted with each food's own measured portions, so 1 cup differs for spinach and olive oil. Repeated ingredients are looked up once. method says how each portion was converted. Ingredients that could not be converted are listed under unresolved with the portions that food supports, and alternatives lists runner-up matches with their fdc_id. Bare names such as rice or beans match many records; names with the cooked state, such as cooked white rice, match more precisely. About a fifth of USDA foods have a portion table.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "items": "<items>"
    },
    "name": "resolve_ingredients"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYesIngredients, each with a food name or fdc_id and a portion or grams, e.g. {"food": "eggplant", "portion": "2 medium"}.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds genuine operational behavior: repeated ingredients are looked up once, unconvertible items surface under 'unresolved' with supported portions, alternatives carry fdc_id, and only about a fifth of USDA foods have a portion table. That last caveat is a valuable failure-mode disclosure an agent could not infer from structured fields.

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 core purpose is front-loaded in the first sentence and every subsequent sentence carries distinct information (conversion semantics, dedup, failure output, naming advice, coverage caveat). It runs long and the paragraph would scan better as short lines, but there is no filler.

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?

With an output schema present, the description need not explain return fields, yet it still conveys the failure paths and matching quality limits an agent needs to interpret results. Annotations cover safety, the schema covers all nested fields, and the description covers the remaining behavioral risk.

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 100%, so the nested item fields (food, grams, fdc_id, portion) are already documented, and the baseline is 3. The description adds real meaning on top: that portions are converted using each food's own measured portions so '1 cup' is food-specific, and that bare names match many records while state-qualified names match precisely.

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?

The opening sentence names a specific verb and resource: it matches ingredient names to FoodData Central foods and converts portions to grams, which is clearly distinct from lookup siblings like search_foods or get_food_nutrition. It stops short of explicitly naming a sibling it replaces, so sibling differentiation is inferred from the batch/convert framing rather than stated.

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?

It gives strong query-formulation advice ('names with the cooked state, such as cooked white rice, match more precisely') and implies the tool is for batch-resolving recipe ingredients. However, it never states when to use this versus search_foods or get_food_nutrition, nor any precondition such as needing a recipe ingredient list first.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources