Skip to main content
Glama

Check whether a food fits a diet

check_diet_fit

Returns fits, does_not_fit or uncertain for one food product and one diet, with the rules that decided it and their sources. Give either a barcode (looked up in Open Food Facts) or the product's ingredient list and label claims. Uncertain results are queued for review by a registered dietitian; treat uncertain as not safe until reviewed. Supports diet 'gluten-free' with mode 'celiac' (strict, default) or 'gluten_avoidance'. PROTOTYPE FOR TESTING: not for use with real people.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "check_diet_fit"
  }
}

Input Schema

NameRequiredDescriptionDefault
dietNoDiet to check against.gluten-free
modeNoceliac = strict; gluten_avoidance = ignores 'may contain' warnings.celiac
barcodeNoProduct barcode (UPC or EAN). Used if no ingredient list is given.
label_claimsNoClaims printed on the package, e.g. 'Gluten-free'.
product_nameNo
ingredients_textNoFull ingredient list as printed on the package, in English.
allergen_statementNoThe package's 'Contains' or 'May contain' statement, if any.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

With zero annotations the description carries the full burden and does substantial work: it discloses an external dependency (barcode lookup in Open Food Facts), a side effect (uncertain results are queued for dietitian review), the safety posture toward uncertain results, and a hard scope warning ('PROTOTYPE FOR TESTING: not for use with real people'). It does not discuss cost, rate limits, or what the rules/sources payload looks like, but these are secondary.

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?

Four compact sentences, each carrying distinct information: return values, input forms, safety handling, supported diet/mode, and the prototype warning. Front-loaded with the return shape, which is the highest-value item. Slightly dense but no filler.

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?

For a 7-parameter tool with no output schema, the description supplies the return shape, the decision provenance, the ambiguity policy, and the external lookup dependency. It also resolves the otherwise confusing zero-required-params situation by explaining that a caller supplies one of two input forms. The prototype caveat is a genuinely important completeness signal.

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 86%, so nearly every parameter is already documented in the schema, and the description mostly restates that (barcode lookup, ingredient list, mode semantics) rather than adding format detail such as barcode length or expected claim vocabulary. Baseline 3 is appropriate when the schema does the heavy lifting.

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?

Starts with a specific verb and resource plus the exact return values ('fits, does_not_fit or uncertain for one food product and one diet'), so the agent knows precisely what comes back. It even names the enrichment ('the rules that decided it and their sources'), which implies a sibling rules tool, but it never names get_diet_rules, so differentiation from that sibling is left to inference.

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?

Explicitly states the two accepted input forms ('either a barcode ... or the product's ingredient list and label claims') and gives a clear safety rule for the ambiguous outcome ('treat uncertain as not safe until reviewed'). Also names the supported diet/mode pair. What's missing is any exclusion or routing relative to get_diet_rules, so the agent must guess when to consult the rules directly.

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