算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
tooluniverse-nutrition-food-composition【设计与创意】Look up nutrient composition, ingredients, allergens, additives, and processing-level classification for foods and branded products via USDA FoodData Central (authoritative US nutrient values, generic + branded foods) and Open Food Facts (crowdsourced global product database — barcode lookup, allergens, additives, Nutri-Score, NOVA processing classif…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Looks up what's actually in a food or branded product — nutrient values, ingredients, allergens, additives, processing classification — from two complementary sources. Does not itself perform toxicological or epidemiological analysis; feed the retrieved data into tooluniverse-toxicology (food additive/allergen safety questions) or tooluniverse-epidemiological-analysis (dietary-exposure questions) for that.
LOOK UP, DON'T GUESS: Never state a nutrient value, ingredient list, allergen, or Nutri-Score from memory — both sources are live and current; query them.
OpenFoodFacts_get_productOpenFoodFacts_filter_products_by_tagsNOT for: assessing whether an additive/ingredient is toxicologically safe (-> tooluniverse-toxicology, e.g. CTD/AOPWiki/EPA CompTox for the additive's own chemical hazard data — this skill only tells you a product contains it); population-level dietary-exposure or disease-association analysis (-> tooluniverse-epidemiological-analysis); clinical nutrition guidelines or diet-disease management recommendations (out of scope for both tools here — they're data lookups, not guideline sources).
The USDA's official nutrient database: Foundation Foods (analytically measured reference values), SR Legacy (the historical USDA standard reference), Survey/FNDDS (foods as reported in national dietary surveys), and Branded (commercial products, including label-declared values).
| Tool | Use for | Key params |
|---|---|---|
FoodDataCentral_search_foods | Keyword search across all data types, or one filtered type | query, page_size (max 200), page_number, data_type ("Foundation" | "Branded" | "SR Legacy" | "Survey (FNDDS)") |
FoodDataCentral_get_food | Full nutrient profile (70+ nutrients) for a known fdcId | fdc_id |
Optional FDC_API_KEY (free, register at https://fdc.nal.usda.gov/api-guide.html) — without one, calls fall back to a shared, rate-limited DEMO_KEY, which is what this skill's live verification used successfully; register a personal key for any workload beyond occasional lookups.
Verified live: FoodDataCentral_search_foods {"query": "raw banana", "page_size": 3, "data_type": "Foundation"} returned real Foundation-food records (e.g. fdcId 1105073, "Bananas, overripe, raw") with full topNutrients arrays and totalHits: 164 across 55 pages. FoodDataCentral_get_food {"fdc_id": 1105073} returned the complete real nutrient profile for that same food, confirming the two tools are consistent. (The tool's JSON description previously cited a different, stale example fdcId that had drifted to return "Starfruit, raw" instead of the banana it claimed — this has been corrected in the tool definition; still, prefer an fdcId you actually got back from search_foods in the same session over any example ID, since USDA's own IDs can be reassigned or deprecated over time.)
3M+ products worldwide, contributed by users and scanned from packaging — broader branded/international coverage than FoodDataCentral's Branded category, but not centrally curated: expect gaps or inconsistencies in any individual product record (missing nutrient fields, unverified ingredient lists) more often than in USDA's data. No API key required for any of the 3 tools.
| Tool | Use for | Key params |
|---|---|---|
OpenFoodFacts_search_products | Free-text search by product/brand name | search_terms (required), page_size (max 100, default 50), page |
OpenFoodFacts_get_product | Full record for a known barcode (EAN-13/UPC) | barcode (required) |
OpenFoodFacts_filter_products_by_tags | Faceted search by controlled-vocabulary tags — answers queries free-text search can't | additives_tags, allergens_tags, categories_tags_en, brands_tags, nutrition_grades_tags, labels_tags, countries_tags, fields, page_size, page (all optional; combine with AND) |
Verified live:
OpenFoodFacts_search_products {"search_terms": "nutella", "page_size": 2} -> real results (count: 1038), including full ingredients_text and nutriments for the top match.OpenFoodFacts_get_product {"barcode": "3017620422003"} -> the real Nutella 400g record: additives_original_tags (en:e322, en:e322i — lecithins), full _keywords, ingredient text in French.OpenFoodFacts_filter_products_by_tags {"allergens_tags": "en:peanuts", "page_size": 2} -> real peanut-allergen products (count: 38821) with additives_tags, allergens_tags, categories_tags_en, labels_tags per record — this is the right tool for "find products containing/excluding X," which search_products' free-text search cannot do reliably.search_products returned an HTML "Page temporarily unavailable" error on a first attempt, then succeeded identically on immediate retry — treat a single such failure as a transient upstream hiccup and retry once before reporting the tool as broken.| Need | Use |
|---|---|
| Rigorous nutrient values for a generic/reference food (clinical dietary calculation, research) | FoodDataCentral (Foundation or SR Legacy) |
| A specific branded product's nutrient label as declared by the manufacturer | Either — FoodDataCentral's Branded type or OpenFoodFacts, cross-check if precision matters |
| Ingredients, allergens, additives, Nutri-Score, or NOVA processing level for a branded product | OpenFoodFacts (FoodDataCentral's ingredients field is a plain string only, no structured allergen/additive tags) |
| Scanning/looking up a physical product by barcode | OpenFoodFacts (get_product) — FoodDataCentral has no barcode lookup |
| "Which products contain/avoid additive X or allergen Y" | OpenFoodFacts filter_products_by_tags — no equivalent in FoodDataCentral |
| Global/international branded products (non-US) | OpenFoodFacts — FoodDataCentral's Branded coverage skews US market |
fdcId from memory — USDA IDs can drift over time (this skill's own reference example was found and fixed once already, see above). Always source the ID from a search_foods call in the same session.filter_products_by_tags's tag fields use a controlled vocabulary (en:peanuts, en:e322, not free text) — get exact tag values from a product's own tag fields (e.g. allergens_tags in a prior get_product/search_products result) rather than guessing the tag string.