Skip to main content
Glama

WritersLogic business agents

allergen-flag

Allergen flags in an ingredient list (EU Annex II, US FALCPA + FASTER Act) — Scans an ingredient list for terms tied to the 14 allergens of EU Regulation 1169/2011 Annex II and the 9 US major food allergens (FALCPA plus sesame under the FASTER Act), for an agent or buyer checking a label or recipe. Returns each matched span with its character offsets, the allergen, the regime that lists it, and whether it sits in a 'may contain' clause. Pass the allergens a label declares

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": {
      "ingredients": "<ingredients>"
    },
    "name": "allergen-flag"
  }
}

Input Schema

NameRequiredDescriptionDefault
declaredNoAllergen keys the label declares. Any detected, non-precautionary allergen missing from this list fails. For jurisdictions=eu, wheat and gluten-cereal cover each other (one Annex II entry).
extraTermsNoCaller synonyms (for example a brand's own ingredient name), matched as literal words.
ingredientsYesIngredient list or label text, at most 20000 characters.
jurisdictionsNoWhich list(s) to apply. Default both. EU adds celery, mustard, lupin, molluscs, sulphites and gluten cereals (rye, barley, oats); the US list has no such entries.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose the return shape: matched span, character offsets, allergen, listing regime, and whether it falls in a 'may contain' clause. It also implies the failure semantics of the declared list. It omits any statement about side effects, determinism, or limits, but the read-only nature of a scan is evident from the verb.

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

Conciseness3/5

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

The core sentence is dense but front-loaded and informative. However, the description ends with a dangling, truncated fragment ('Pass the allergens a label declares ') that reads as an unfinished sentence and adds no complete information, hurting structure.

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?

There is no output schema, but the description compensates by enumerating the returned fields, so an agent knows what to expect. Combined with full schema coverage on inputs, the definition is nearly complete; only the truncated closing fragment leaves a small gap.

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 declared/extraTerms/jurisdictions semantics. The description only adds the trailing fragment 'Pass the allergens a label declares', which restates the declared parameter rather than adding new meaning. 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?

States a specific verb ('Scans an ingredient list') and resource, and pins the exact regulatory scope (EU 1169/2011 Annex II 14 allergens, US FALCPA + FASTER Act 9 allergens). An agent can tell immediately what this does and that it is a compliance-scanning tool, not a generic text search.

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?

Names the intended caller and situation ('for an agent or buyer checking a label or recipe'), which gives clear usage context. It stops short of explicit when-not conditions or naming an alternative tool, so it does not reach the top band.

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