@pipeworx/codex-gsfa
Connect: https://gateway.pipeworx.io/codex-gsfa/mcp · Install: one-click buttons
Tools: 7
The FAO/WHO Codex General Standard for Food Additives (GSFA, CXS 192-1995) — which food additives may be used in which foods, at what maximum level, under which conditions.
Tools
| Tool | Answers |
|---|---|
gsfa_check_use | Is INS 461 permitted in cooked fish, and at what level? — the question the standard exists to answer |
gsfa_search_additive | Resolve an INS number, name, or synonym to its GSFA entry |
gsfa_additive_provisions | Every food category one additive is permitted in |
gsfa_food_category_additives | Every additive permitted in one food category |
gsfa_search_food_categories | Find a GSFA category number by name or number prefix |
gsfa_notes | Resolve the numbered notes that condition a provision, or search them by wording |
gsfa_coverage | What this dataset holds and how current it is |
Two kinds of permission
GSFA grants use in two structurally different ways, and every provision returned says which one it came from:
- Table 1 & 2 (
provision_table: "table1_2") — a specific maximum use level, either numeric (10,000 mg/kg) orGMP, usually conditioned by numbered notes. - Table 3 (
provision_table: "table3") — the additive is permitted under good manufacturing practice with no numeric limit.
For methyl cellulose that is 17 Table 1/2 provisions against 61 Table 3 ones. Treating them as one thing either invents limits the standard does not set or hides most of where an additive is actually allowed.
Subcategory inheritance
A GSFA provision applies to the food category named and all of its
subcategories — a provision on 01.4 also governs 01.4.4. Lookups walk up
the numbering and report inherited_from_parent plus matched_food_category,
because “permitted at this level for this exact food” and “permitted because its
parent category is” are different answers.
permitted: false means the standard lists no provision. That is not the
same as an explicit prohibition, and the response says so rather than implying
a ban.
Notes are part of the answer
Provisions are frequently qualified by numbered notes — “for use in ready-to-drink products only”, “as sulphur dioxide”, “on the fat basis” — and a maximum level is not fully specified without them. 2,590 of 15,377 provisions carry one.
Note text is inlined on every provision (notes: [{id, text}]), not left as
a bare id, because an id with no text invites a caller to read the level and
stop. gsfa_notes resolves ids directly or searches note wording.
The text is scraped from the note icon’s tooltip on each additive page, so it carries the same Codex session as the additive it qualifies. All 468 cited note ids resolve.
Auth
None. The dataset ships inside the pack.
Freshness
Every additive result carries cac_session, cac_year, and snapshot_date.
Records come from archived snapshots of GSFA Online, so individual additives can
lag the newest Codex session — gsfa_coverage reports which sessions are
present and which additive ids could not be retrieved at all (entries whose
every archived snapshot is one of FAO’s own error pages).
Regenerate with:
node --experimental-strip-types scripts/ingest-gsfa.ts
Data sources
- Codex GSFA Online — https://www.fao.org/gsfaonline/ (FAO fronts this with a
Cloudflare managed challenge; we read Internet Archive snapshots instead —
see
docs/codex-gsfa-plan.mdfor the route and the freshness plan) - Codex Alimentarius CXS 192-1995 — https://www.fao.org/fao-who-codexalimentarius/codex-texts/dbs/gsfa/en/
- JECFA specifications and evaluations, which GSFA links to for toxicological data — https://apps.who.int/food-additives-contaminants-jecfa-database/
Tools
- gsfa_check_use — Answer whether a specific food additive is permitted in a specific food category under the Codex General Standard for Food Additives, and at what maximum level. Returns the maximum use level (a numeri
- gsfa_search_additive — Find food additives in the Codex GSFA by INS number, name, or synonym. Returns each match with its INS number, name, synonyms, technological functional classes (thickener, preservative, colour, and so
- gsfa_additive_provisions — List every food category in which a given food additive is permitted under the Codex GSFA, with the maximum use level for each. Separates Table 1 and 2 provisions (which carry a specific maximum level
- gsfa_food_category_additives — List every food additive permitted in a given Codex GSFA food category, with each maximum use level. Includes provisions inherited from parent categories, since a GSFA provision applies to a category
- gsfa_search_food_categories — Search the Codex GSFA food category system by number or name — for example “cheese”, “beverages”, or “01.4”. Returns matching category numbers and names. Use to find the right GSFA food category numbe
- gsfa_notes — Look up the qualifying notes that condition Codex GSFA food additive provisions. GSFA provisions are frequently limited by numbered notes such as “for use in ready-to-drink products only”, “as sulphur
- gsfa_coverage — Report what this Codex GSFA dataset contains and how current it is: the Codex Alimentarius Commission sessions represented, counts of additives, food categories and provisions, and which additive reco
Tools
-
gsfa_additive_provisions— List every food category in which a given food additive is permitted under the Codex GSFA, with the maximum use level for each. Separates Table 1 and 2 provisions (which carry a specific maximum level -
gsfa_check_use— Answer whether a specific food additive is permitted in a specific food category under the Codex General Standard for Food Additives, and at what maximum level. Returns the maximum use level (a numeri -
gsfa_coverage— Report what this Codex GSFA dataset contains and how current it is: the Codex Alimentarius Commission sessions represented, counts of additives, food categories and provisions, and which additive reco -
gsfa_food_category_additives— List every food additive permitted in a given Codex GSFA food category, with each maximum use level. Includes provisions inherited from parent categories, since a GSFA provision applies to a category -
gsfa_notes— Look up the qualifying notes that condition Codex GSFA food additive provisions. GSFA provisions are frequently limited by numbered notes such as for use in ready-to-drink products only , as sulphur d -
gsfa_search_additive— Find food additives in the Codex GSFA by INS number, name, or synonym. Returns each match with its INS number, name, synonyms, technological functional classes (thickener, preservative, colour, and so -
gsfa_search_food_categories— Search the Codex GSFA food category system by number or name — for example cheese , beverages , or 01.4 . Returns matching category numbers and names. Use to find the right GSFA food category number b