Skip to main content
Glama

Find an ingredient substitute

substitute_ingredient
Read-onlyIdempotent

Find what can replace a single ingredient, optionally under a dietary constraint (vegan, vegetarian, halal, dairy-free, pescatarian). Each result is marked "substitute" (same dish) or "adaptation" (result is a meaningfully different dish) - most swaps forced by a diet exclusion are adaptations, and the tool says so rather than overselling a swap as if the dish stayed the same. Precomputed and model-verified, not generated on the fly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNoLanguage for titles, ingredient names and URLs.en
limitNoMax substitutes to return, best first.
contextNoDietary constraint the substitute must satisfy. Omit for the single best general substitute with no diet filter. Other constraints (gluten-free, allergen-free) are not supported - the corpus has no gluten/allergen data, so the tool would have to guess, and it does not.
ingredientYesIngredient name in any of the 7 site languages, or its English canonical form (e.g. "pork belly", "domuz göbeği", "Schweinebauch").

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
notesYes
contextYes
declinedYesSet instead of an empty substitutes array explaining why there are none - a missing reason is a bug, not a deliberate silence.
ingredientYesResolved canonical (English) ingredient name.
attributionYes
resolved_byYes
substitutesYes
ingredient_labelYesIngredient name translated into the requested language.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

The description adds substantial behavioral context beyond the readOnly/openWorld/idempotent annotations: it discloses the result classification scheme, warns that diet-forced swaps are usually 'adaptations' rather than true substitutes, and states results are 'precomputed and model-verified, not generated on the fly.' This manages agent expectations about result quality and honesty.

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

Conciseness5/5

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

The description is compact and front-loaded: the core action and constraint are in the first sentence, and the second sentence adds only high-value behavioral caveats. Every clause earns its place, with no redundant wording.

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?

Given the rich input schema, output schema, and annotations, the description covers the essential semantics: what the tool does, the supported constraints, the substitute/adaptation distinction, and the precomputed nature of results. Nothing critical is missing for an agent to select and invoke the tool correctly.

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 description coverage is 100%, so the schema already documents all four parameters, including the context enum and language range. The description mostly reinforces the context parameter and ingredient scope without adding new per-parameter meaning, so the baseline 3 is appropriate.

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 opens with a specific verb+resource pairing, 'Find what can replace a single ingredient,' which clearly distinguishes this tool from dish-level siblings like compare_dishes and find_similar_dishes. It further clarifies the deliverable by defining 'substitute' vs 'adaptation,' so an agent understands exactly what the tool returns.

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?

The description makes the tool's use case explicit: replacing a single ingredient, optionally under a listed dietary constraint such as vegan, vegetarian, halal, dairy-free, or pescatarian. It gives clear context but does not explicitly name sibling tools or state when not to use this tool, stopping short of full exclusion guidance.

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