食品營養成分查詢
tw_query_food_nutrition
台灣專屬MIT
**關鍵字 / Keywords**: 食品營養 成分 熱量 蛋白質 food nutrition composition calories protein 台灣食品
衛福部 台灣食品營養成分資料 (data.gov.tw 8543, 226,825 行).
每筆 = 1 個食材 × 1 個營養素分析項. 同食材通常有 20+ 筆 (一營養素一筆).
含 每 100g + 每單位 (e.g. 一份/一顆/一片) 含量, 樣本數, 標準差.
至少要給 food_name 或 nutrient 其一.
Args:
food_name: 樣品名稱 / 俗名 / 英文名 substring
(e.g. "雞蛋", "rice", "豆腐", "mackerel")
nutrient: 分析項 substring
(e.g. "蛋白質", "鈉", "鐵", "維生素C", "膽固醇",
"脂肪酸組成", "膳食纖維")
limit: max 結果 (1..500, default 20)
Returns:
{n_corpus, n_returned, query, hits: [{category, food, alias,
name_en, nutrient_category, nutrient, unit, per_100g, sample_n,
per_serving, per_serving_g, integration_id}, ...]}
典型用例:
「雞蛋有多少蛋白質」 → tw_query_food_nutrition(food_name="雞蛋",
nutrient="蛋白質")
「鈉含量最高的食物」 → tw_query_food_nutrition(nutrient="鈉",
limit=50) 後 client sort輸入 schema
{
"properties": {
"food_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Food Name"
},
"nutrient": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Nutrient"
},
"limit": {
"default": 20,
"title": "Limit",
"type": "integer"
}
},
"title": "tw_query_food_nutritionArguments",
"type": "object"
}呼叫方式
配置好 Twinkle Hub 的 MCP client 後,agent 會看到 tw_query_food_nutrition。直接讓它呼叫即可,例如:
# Ask Claude / any MCP client: 請用 tw_query_food_nutrition 處理 "…"。 # It will call: tw_query_food_nutrition(input="…")
尚未設定 Client?
Claude Desktop 約 3 分鐘即可完成設定 — 下載 .mcpb 檔案並雙擊即可,或參閱文件中的各 Client 安裝步驟。
查看使用者設定文件