{"at":"2026-11-23T05:48:39.189Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T05:48:39.583Z","dir":"received","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"taco-br","version":"0.1.1"}},"cacheScope":"private","capabilities":{"tools":{"listChanged":true}},"resultType":"complete","supportedVersions":["2026-07-28"],"ttlMs":0}}}
{"at":"2026-11-23T05:48:39.583Z","dir":"sent","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T05:48:39.589Z","dir":"received","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"taco-br","version":"0.1.1"}},"cacheScope":"private","resultType":"complete","tools":[{"annotations":{"readOnlyHint":true},"description":"Health check for the taco-br server. Returns the server name, version and the data source citation.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"echo":{"description":"Optional text to echo back in the message.","maxLength":200,"type":"string"}},"type":"object"},"name":"ping","outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"ok":{"const":true,"description":"Always true when the server is alive.","type":"boolean"},"server":{"description":"Server name.","type":"string"},"source":{"description":"Citation for the data this server exposes.","type":"string"},"version":{"description":"Server version.","type":"string"}},"required":["ok","server","version","source"],"type":"object"},"title":"Ping"},{"annotations":{"readOnlyHint":true},"description":"Find foods in the Brazilian TACO table (597 items, per 100 g) by name in Portuguese. Accent-insensitive; knows a few synonyms (aipim, macaxeira, pão de sal). Returns ids to use with get_nutrients. Restaurant dishes and brands are mostly absent.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"limit":{"default":10,"description":"Maximum number of results (default 10).","maximum":25,"minimum":1,"type":"integer"},"query":{"description":"Food name in Portuguese, e.g. \"feijão carioca cozido\" or \"pao de queijo\".","maxLength":200,"minLength":1,"type":"string"}},"required":["query"],"type":"object"},"name":"search_food","outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"query":{"description":"The query as received.","type":"string"},"results":{"description":"Best matches first.","items":{"additionalProperties":false,"properties":{"category":{"description":"TACO food group.","type":"string"},"energy_kcal":{"anyOf":[{"type":"number"},{"additionalProperties":false,"properties":{"trace":{"const":true,"type":"boolean"}},"required":["trace"],"type":"object"},{"type":"null"}],"description":"Energy per 100 g of edible portion, in kcal."},"id":{"description":"TACO food number. Pass it to get_nutrients.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"matched_via_synonym":{"description":"Set when the food was found through this synonym of the query.","type":"string"},"name":{"description":"Food name exactly as in the TACO table.","type":"string"}},"required":["id","name","category","energy_kcal"],"type":"object"},"type":"array"},"source":{"description":"Citation for the data.","type":"string"},"total_matches":{"description":"How many foods in the table match the query.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["query","total_matches","results","source"],"type":"object"},"title":"Search foods in TACO"},{"annotations":{"readOnlyHint":true},"description":"Full composition of one TACO food by id (from search_food), per 100 g or scaled to a quantity in grams. Missing data is reported as null (not analyzed) or {\"trace\":true}, never as 0.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"food_id":{"description":"TACO food number, as returned by search_food.","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"grams":{"description":"Quantity in grams of edible portion. Omit for the table basis of 100 g.","exclusiveMinimum":0,"maximum":10000,"type":"number"},"nutrients":{"description":"Nutrient keys to return (e.g. \"energy_kcal\", \"protein_g\", \"iron_mg\"). Omit for all.","items":{"enum":["moisture_pct","energy_kcal","energy_kj","protein_g","lipids_g","cholesterol_mg","carbohydrate_g","dietary_fiber_g","ash_g","calcium_mg","magnesium_mg","manganese_mg","phosphorus_mg","iron_mg","sodium_mg","potassium_mg","copper_mg","zinc_mg","retinol_mcg","re_mcg","rae_mcg","thiamine_mg","riboflavin_mg","pyridoxine_mg","niacin_mg","vitamin_c_mg"],"type":"string"},"minItems":1,"type":"array"}},"required":["food_id"],"type":"object"},"name":"get_nutrients","outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"basis_grams":{"description":"Quantity the amounts refer to, in grams of edible portion.","type":"number"},"food":{"additionalProperties":false,"properties":{"category":{"description":"TACO food group.","type":"string"},"id":{"description":"TACO food number.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"description":"Food name exactly as in the TACO table.","type":"string"}},"required":["id","name","category"],"type":"object"},"not_analyzed_nutrients":{"description":"Keys with no value in the TACO table; not zero.","items":{"type":"string"},"type":"array"},"notes":{"description":"Caveats about this food or this answer.","items":{"type":"string"},"type":"array"},"nutrients":{"description":"Requested nutrients, in table order.","items":{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"type":"number"},{"additionalProperties":false,"properties":{"trace":{"const":true,"type":"boolean"}},"required":["trace"],"type":"object"},{"type":"null"}],"description":"Value for basis_grams (equals per_100g when not scaled)."},"key":{"description":"Nutrient key.","type":"string"},"label_pt":{"description":"Nutrient name in Portuguese.","type":"string"},"per_100g":{"anyOf":[{"type":"number"},{"additionalProperties":false,"properties":{"trace":{"const":true,"type":"boolean"}},"required":["trace"],"type":"object"},{"type":"null"}],"description":"Value in the TACO table, per 100 g."},"unit":{"description":"Unit of per_100g and amount.","type":"string"}},"required":["key","label_pt","unit","per_100g","amount"],"type":"object"},"type":"array"},"scaled":{"description":"True when amounts were computed from the per-100 g table values for another quantity.","type":"boolean"},"source":{"description":"Citation for the data.","type":"string"},"trace_nutrients":{"description":"Keys reported as trace (Tr).","items":{"type":"string"},"type":"array"}},"required":["food","basis_grams","scaled","nutrients","trace_nutrients","not_analyzed_nutrients","notes","source"],"type":"object"},"title":"Get nutrients of a food"},{"annotations":{"readOnlyHint":true},"description":"Sum nutrients over a list of TACO foods (ids from search_food). Each item has either grams or a household_measure with quantity (e.g. \"colher de sopa\" x 2, covered foods only; see convert_household_measure). Totals are lower bounds when an item has no data for a nutrient: the response says which. Defaults to energy, protein, fat, carbohydrate, fiber and sodium.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"items":{"description":"Foods in the meal. The same food may appear more than once.","items":{"properties":{"food_id":{"description":"TACO food number, as returned by search_food.","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"grams":{"description":"Quantity of this food in grams of edible portion, as eaten (cooked weight for cooked foods). Give this or household_measure, not both.","exclusiveMinimum":0,"maximum":10000,"type":"number"},"household_measure":{"description":"Household measure instead of grams, e.g. \"colher de sopa\", \"unidade\", \"fatia\", \"concha\". Only for foods with curated measures.","maxLength":100,"minLength":1,"type":"string"},"quantity":{"description":"How many of household_measure (default 1; may be fractional). Not used with grams.","exclusiveMinimum":0,"maximum":1000,"type":"number"}},"required":["food_id"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"nutrients":{"description":"Nutrient keys to total. Omit for energy, protein, fat, carbohydrate, fiber and sodium.","items":{"enum":["moisture_pct","energy_kcal","energy_kj","protein_g","lipids_g","cholesterol_mg","carbohydrate_g","dietary_fiber_g","ash_g","calcium_mg","magnesium_mg","manganese_mg","phosphorus_mg","iron_mg","sodium_mg","potassium_mg","copper_mg","zinc_mg","retinol_mcg","re_mcg","rae_mcg","thiamine_mg","riboflavin_mg","pyridoxine_mg","niacin_mg","vitamin_c_mg"],"type":"string"},"minItems":1,"type":"array"}},"required":["items"],"type":"object"},"name":"calc_meal","outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"complete":{"description":"True when every requested nutrient has data for every item (no total is a lower bound).","type":"boolean"},"household_source":{"description":"Citation for the household measure weights; set when any item used one.","type":"string"},"items":{"description":"The meal items in the order received.","items":{"additionalProperties":false,"properties":{"amounts":{"additionalProperties":{"anyOf":[{"type":"number"},{"additionalProperties":false,"properties":{"trace":{"const":true,"type":"boolean"}},"required":["trace"],"type":"object"},{"type":"null"}],"description":"A number in the nutrient unit; {\"trace\":true} when the table reports a trace (Tr, below the quantification limit); null when the TACO table publishes no value (not analyzed, not applicable or under re-evaluation). Never read null or trace as 0."},"description":"Amount of each requested nutrient in this item, keyed by nutrient key.","propertyNames":{"type":"string"},"type":"object"},"food_id":{"description":"TACO food number.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"grams":{"description":"Quantity of this item, in grams of edible portion.","type":"number"},"household":{"additionalProperties":false,"description":"Set when the item was given as a household measure and converted to grams.","properties":{"grams_per_measure":{"description":"Weight of one measure in grams.","type":"number"},"measure":{"description":"Household measure used, in Portuguese.","type":"string"},"quantity":{"description":"How many of the measure.","type":"number"},"source_description":{"description":"Description of the POF row the weight comes from.","type":"string"}},"required":["measure","quantity","grams_per_measure","source_description"],"type":"object"},"name":{"description":"Food name exactly as in the TACO table.","type":"string"}},"required":["food_id","name","grams","amounts"],"type":"object"},"type":"array"},"notes":{"description":"Caveats about this answer.","items":{"type":"string"},"type":"array"},"source":{"description":"Citation for the data.","type":"string"},"total_grams":{"description":"Sum of the item quantities.","type":"number"},"totals":{"description":"One entry per requested nutrient, in table order.","items":{"additionalProperties":false,"properties":{"is_lower_bound":{"description":"True when at least one item has no value in the TACO table for this nutrient: the real total is higher than this number.","type":"boolean"},"key":{"description":"Nutrient key.","type":"string"},"label_pt":{"description":"Nutrient name in Portuguese.","type":"string"},"not_analyzed_in":{"description":"Names of the items with no value in the TACO table for this nutrient.","items":{"type":"string"},"type":"array"},"total":{"anyOf":[{"type":"number"},{"additionalProperties":false,"properties":{"trace":{"const":true,"type":"boolean"}},"required":["trace"],"type":"object"},{"type":"null"}],"description":"Sum over the items that have data. null when no item has data; {\"trace\":true} when every item is trace."},"trace_in":{"description":"Names of the items reported as trace (Tr) for this nutrient; they add a tiny, unquantified amount.","items":{"type":"string"},"type":"array"},"unit":{"description":"Unit of total.","type":"string"}},"required":["key","label_pt","unit","total","is_lower_bound","not_analyzed_in","trace_in"],"type":"object"},"type":"array"}},"required":["items","total_grams","totals","complete","notes","source"],"type":"object"},"title":"Calculate the nutrients of a meal"},{"annotations":{"readOnlyHint":true},"description":"Compare 2 to 10 TACO foods (ids from search_food) on chosen nutrients, per 100 g of edible portion. Missing data stays null or {\"trace\":true}; do not rank a food with null as having less.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"food_ids":{"description":"TACO food numbers to compare, as returned by search_food.","items":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"maxItems":10,"minItems":2,"type":"array"},"nutrients":{"description":"Nutrient keys to compare. Omit for energy, protein, fat, carbohydrate, fiber and sodium.","items":{"enum":["moisture_pct","energy_kcal","energy_kj","protein_g","lipids_g","cholesterol_mg","carbohydrate_g","dietary_fiber_g","ash_g","calcium_mg","magnesium_mg","manganese_mg","phosphorus_mg","iron_mg","sodium_mg","potassium_mg","copper_mg","zinc_mg","retinol_mcg","re_mcg","rae_mcg","thiamine_mg","riboflavin_mg","pyridoxine_mg","niacin_mg","vitamin_c_mg"],"type":"string"},"minItems":1,"type":"array"}},"required":["food_ids"],"type":"object"},"name":"compare_foods","outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"basis":{"description":"Quantity all values refer to.","type":"string"},"foods":{"description":"The foods compared, in the order received.","items":{"additionalProperties":false,"properties":{"category":{"description":"TACO food group.","type":"string"},"id":{"description":"TACO food number.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"description":"Food name exactly as in the TACO table.","type":"string"}},"required":["id","name","category"],"type":"object"},"type":"array"},"notes":{"description":"Caveats about this answer.","items":{"type":"string"},"type":"array"},"nutrients":{"description":"One row per requested nutrient, in table order.","items":{"additionalProperties":false,"properties":{"key":{"description":"Nutrient key.","type":"string"},"label_pt":{"description":"Nutrient name in Portuguese.","type":"string"},"unit":{"description":"Unit of the values.","type":"string"},"values":{"description":"One value per food, in the same order as foods.","items":{"anyOf":[{"type":"number"},{"additionalProperties":false,"properties":{"trace":{"const":true,"type":"boolean"}},"required":["trace"],"type":"object"},{"type":"null"}],"description":"A number in the nutrient unit; {\"trace\":true} when the table reports a trace (Tr, below the quantification limit); null when the TACO table publishes no value (not analyzed, not applicable or under re-evaluation). Never read null or trace as 0."},"type":"array"}},"required":["key","label_pt","unit","values"],"type":"object"},"type":"array"},"source":{"description":"Citation for the data.","type":"string"}},"required":["basis","foods","nutrients","notes","source"],"type":"object"},"title":"Compare foods side by side"},{"annotations":{"readOnlyHint":true},"description":"Convert a Brazilian household measure (e.g. 2 colheres de sopa, 1 unidade, 1 fatia) of a TACO food to grams, using the IBGE POF table through a hand-curated mapping. Only some foods are covered; it never guesses: on ambiguity it returns candidates, and for uncovered foods or measures it says so. Pass food_id (from search_food) or food_query.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"food_id":{"description":"TACO food number, as returned by search_food. Preferred over food_query.","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"food_query":{"description":"Food name in Portuguese, used only when food_id is not given; must match exactly one food.","maxLength":200,"minLength":1,"type":"string"},"measure":{"description":"Household measure in Portuguese, e.g. \"colher de sopa\", \"unidade\", \"fatia\", \"concha\", \"copo americano\".","maxLength":100,"minLength":1,"type":"string"},"quantity":{"description":"How many of the measure (default 1; may be fractional, e.g. 0.5).","exclusiveMinimum":0,"maximum":1000,"type":"number"}},"required":["measure"],"type":"object"},"name":"convert_household_measure","outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"available_measures":{"description":"Measures known for this food (status unknown_measure).","items":{"additionalProperties":false,"properties":{"grams":{"description":"Weight of one measure in grams.","type":"number"},"key":{"description":"Stable measure key.","type":"string"},"label":{"description":"Measure name in Portuguese.","type":"string"}},"required":["key","label","grams"],"type":"object"},"type":"array"},"candidates":{"description":"Foods matching the query (status ambiguous_food), best first.","items":{"additionalProperties":false,"properties":{"has_household_measures":{"description":"Whether this food can be converted.","type":"boolean"},"id":{"description":"TACO food number.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"description":"Food name exactly as in the TACO table.","type":"string"}},"required":["id","name","has_household_measures"],"type":"object"},"type":"array"},"food":{"additionalProperties":false,"description":"The resolved food (not set for ambiguous_food / no_food_match).","properties":{"id":{"description":"TACO food number.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"description":"Food name exactly as in the TACO table.","type":"string"}},"required":["id","name"],"type":"object"},"grams":{"description":"quantity x grams_per_measure (status ok).","type":"number"},"grams_per_measure":{"description":"Weight of one measure in grams (status ok).","type":"number"},"household_source":{"description":"Citation for the household measure weights.","type":"string"},"measure":{"additionalProperties":false,"description":"The matched household measure (status ok).","properties":{"key":{"description":"Stable measure key.","type":"string"},"label":{"description":"Measure name in Portuguese.","type":"string"},"source_description":{"description":"Description of the POF row the weight comes from.","type":"string"}},"required":["key","label","source_description"],"type":"object"},"notes":{"description":"Caveats and next steps.","items":{"type":"string"},"type":"array"},"quantity":{"description":"How many of the measure (status ok).","type":"number"},"source":{"description":"Citation for the nutrient table.","type":"string"},"status":{"description":"ok: grams computed. ambiguous_food: the query matched several foods, pick an id from candidates. no_food_match: no food found. no_household_data: this food has no curated household measures, ask for grams. unknown_measure: use one of available_measures.","enum":["ok","ambiguous_food","no_food_match","no_household_data","unknown_measure"],"type":"string"}},"required":["status","notes","source","household_source"],"type":"object"},"title":"Convert a household measure to grams"}],"ttlMs":0}}}
{"at":"2026-11-23T05:48:39.690Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T05:48:40.066Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{"listChanged":true}},"protocolVersion":"2025-11-25","serverInfo":{"name":"taco-br","version":"0.1.1"}}}}
{"at":"2026-11-23T05:48:40.066Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T05:48:40.066Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T05:48:40.074Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"readOnlyHint":true},"description":"Health check for the taco-br server. Returns the server name, version and the data source citation.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"echo":{"description":"Optional text to echo back in the message.","maxLength":200,"type":"string"}},"type":"object"},"name":"ping","outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"ok":{"const":true,"description":"Always true when the server is alive.","type":"boolean"},"server":{"description":"Server name.","type":"string"},"source":{"description":"Citation for the data this server exposes.","type":"string"},"version":{"description":"Server version.","type":"string"}},"required":["ok","server","version","source"],"type":"object"},"title":"Ping"},{"annotations":{"readOnlyHint":true},"description":"Find foods in the Brazilian TACO table (597 items, per 100 g) by name in Portuguese. Accent-insensitive; knows a few synonyms (aipim, macaxeira, pão de sal). Returns ids to use with get_nutrients. Restaurant dishes and brands are mostly absent.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"limit":{"default":10,"description":"Maximum number of results (default 10).","maximum":25,"minimum":1,"type":"integer"},"query":{"description":"Food name in Portuguese, e.g. \"feijão carioca cozido\" or \"pao de queijo\".","maxLength":200,"minLength":1,"type":"string"}},"required":["query"],"type":"object"},"name":"search_food","outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"query":{"description":"The query as received.","type":"string"},"results":{"description":"Best matches first.","items":{"additionalProperties":false,"properties":{"category":{"description":"TACO food group.","type":"string"},"energy_kcal":{"anyOf":[{"type":"number"},{"additionalProperties":false,"properties":{"trace":{"const":true,"type":"boolean"}},"required":["trace"],"type":"object"},{"type":"null"}],"description":"Energy per 100 g of edible portion, in kcal."},"id":{"description":"TACO food number. Pass it to get_nutrients.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"matched_via_synonym":{"description":"Set when the food was found through this synonym of the query.","type":"string"},"name":{"description":"Food name exactly as in the TACO table.","type":"string"}},"required":["id","name","category","energy_kcal"],"type":"object"},"type":"array"},"source":{"description":"Citation for the data.","type":"string"},"total_matches":{"description":"How many foods in the table match the query.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["query","total_matches","results","source"],"type":"object"},"title":"Search foods in TACO"},{"annotations":{"readOnlyHint":true},"description":"Full composition of one TACO food by id (from search_food), per 100 g or scaled to a quantity in grams. Missing data is reported as null (not analyzed) or {\"trace\":true}, never as 0.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"food_id":{"description":"TACO food number, as returned by search_food.","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"grams":{"description":"Quantity in grams of edible portion. Omit for the table basis of 100 g.","exclusiveMinimum":0,"maximum":10000,"type":"number"},"nutrients":{"description":"Nutrient keys to return (e.g. \"energy_kcal\", \"protein_g\", \"iron_mg\"). Omit for all.","items":{"enum":["moisture_pct","energy_kcal","energy_kj","protein_g","lipids_g","cholesterol_mg","carbohydrate_g","dietary_fiber_g","ash_g","calcium_mg","magnesium_mg","manganese_mg","phosphorus_mg","iron_mg","sodium_mg","potassium_mg","copper_mg","zinc_mg","retinol_mcg","re_mcg","rae_mcg","thiamine_mg","riboflavin_mg","pyridoxine_mg","niacin_mg","vitamin_c_mg"],"type":"string"},"minItems":1,"type":"array"}},"required":["food_id"],"type":"object"},"name":"get_nutrients","outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"basis_grams":{"description":"Quantity the amounts refer to, in grams of edible portion.","type":"number"},"food":{"additionalProperties":false,"properties":{"category":{"description":"TACO food group.","type":"string"},"id":{"description":"TACO food number.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"description":"Food name exactly as in the TACO table.","type":"string"}},"required":["id","name","category"],"type":"object"},"not_analyzed_nutrients":{"description":"Keys with no value in the TACO table; not zero.","items":{"type":"string"},"type":"array"},"notes":{"description":"Caveats about this food or this answer.","items":{"type":"string"},"type":"array"},"nutrients":{"description":"Requested nutrients, in table order.","items":{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"type":"number"},{"additionalProperties":false,"properties":{"trace":{"const":true,"type":"boolean"}},"required":["trace"],"type":"object"},{"type":"null"}],"description":"Value for basis_grams (equals per_100g when not scaled)."},"key":{"description":"Nutrient key.","type":"string"},"label_pt":{"description":"Nutrient name in Portuguese.","type":"string"},"per_100g":{"anyOf":[{"type":"number"},{"additionalProperties":false,"properties":{"trace":{"const":true,"type":"boolean"}},"required":["trace"],"type":"object"},{"type":"null"}],"description":"Value in the TACO table, per 100 g."},"unit":{"description":"Unit of per_100g and amount.","type":"string"}},"required":["key","label_pt","unit","per_100g","amount"],"type":"object"},"type":"array"},"scaled":{"description":"True when amounts were computed from the per-100 g table values for another quantity.","type":"boolean"},"source":{"description":"Citation for the data.","type":"string"},"trace_nutrients":{"description":"Keys reported as trace (Tr).","items":{"type":"string"},"type":"array"}},"required":["food","basis_grams","scaled","nutrients","trace_nutrients","not_analyzed_nutrients","notes","source"],"type":"object"},"title":"Get nutrients of a food"},{"annotations":{"readOnlyHint":true},"description":"Sum nutrients over a list of TACO foods (ids from search_food). Each item has either grams or a household_measure with quantity (e.g. \"colher de sopa\" x 2, covered foods only; see convert_household_measure). Totals are lower bounds when an item has no data for a nutrient: the response says which. Defaults to energy, protein, fat, carbohydrate, fiber and sodium.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"items":{"description":"Foods in the meal. The same food may appear more than once.","items":{"properties":{"food_id":{"description":"TACO food number, as returned by search_food.","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"grams":{"description":"Quantity of this food in grams of edible portion, as eaten (cooked weight for cooked foods). Give this or household_measure, not both.","exclusiveMinimum":0,"maximum":10000,"type":"number"},"household_measure":{"description":"Household measure instead of grams, e.g. \"colher de sopa\", \"unidade\", \"fatia\", \"concha\". Only for foods with curated measures.","maxLength":100,"minLength":1,"type":"string"},"quantity":{"description":"How many of household_measure (default 1; may be fractional). Not used with grams.","exclusiveMinimum":0,"maximum":1000,"type":"number"}},"required":["food_id"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"nutrients":{"description":"Nutrient keys to total. Omit for energy, protein, fat, carbohydrate, fiber and sodium.","items":{"enum":["moisture_pct","energy_kcal","energy_kj","protein_g","lipids_g","cholesterol_mg","carbohydrate_g","dietary_fiber_g","ash_g","calcium_mg","magnesium_mg","manganese_mg","phosphorus_mg","iron_mg","sodium_mg","potassium_mg","copper_mg","zinc_mg","retinol_mcg","re_mcg","rae_mcg","thiamine_mg","riboflavin_mg","pyridoxine_mg","niacin_mg","vitamin_c_mg"],"type":"string"},"minItems":1,"type":"array"}},"required":["items"],"type":"object"},"name":"calc_meal","outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"complete":{"description":"True when every requested nutrient has data for every item (no total is a lower bound).","type":"boolean"},"household_source":{"description":"Citation for the household measure weights; set when any item used one.","type":"string"},"items":{"description":"The meal items in the order received.","items":{"additionalProperties":false,"properties":{"amounts":{"additionalProperties":{"anyOf":[{"type":"number"},{"additionalProperties":false,"properties":{"trace":{"const":true,"type":"boolean"}},"required":["trace"],"type":"object"},{"type":"null"}],"description":"A number in the nutrient unit; {\"trace\":true} when the table reports a trace (Tr, below the quantification limit); null when the TACO table publishes no value (not analyzed, not applicable or under re-evaluation). Never read null or trace as 0."},"description":"Amount of each requested nutrient in this item, keyed by nutrient key.","propertyNames":{"type":"string"},"type":"object"},"food_id":{"description":"TACO food number.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"grams":{"description":"Quantity of this item, in grams of edible portion.","type":"number"},"household":{"additionalProperties":false,"description":"Set when the item was given as a household measure and converted to grams.","properties":{"grams_per_measure":{"description":"Weight of one measure in grams.","type":"number"},"measure":{"description":"Household measure used, in Portuguese.","type":"string"},"quantity":{"description":"How many of the measure.","type":"number"},"source_description":{"description":"Description of the POF row the weight comes from.","type":"string"}},"required":["measure","quantity","grams_per_measure","source_description"],"type":"object"},"name":{"description":"Food name exactly as in the TACO table.","type":"string"}},"required":["food_id","name","grams","amounts"],"type":"object"},"type":"array"},"notes":{"description":"Caveats about this answer.","items":{"type":"string"},"type":"array"},"source":{"description":"Citation for the data.","type":"string"},"total_grams":{"description":"Sum of the item quantities.","type":"number"},"totals":{"description":"One entry per requested nutrient, in table order.","items":{"additionalProperties":false,"properties":{"is_lower_bound":{"description":"True when at least one item has no value in the TACO table for this nutrient: the real total is higher than this number.","type":"boolean"},"key":{"description":"Nutrient key.","type":"string"},"label_pt":{"description":"Nutrient name in Portuguese.","type":"string"},"not_analyzed_in":{"description":"Names of the items with no value in the TACO table for this nutrient.","items":{"type":"string"},"type":"array"},"total":{"anyOf":[{"type":"number"},{"additionalProperties":false,"properties":{"trace":{"const":true,"type":"boolean"}},"required":["trace"],"type":"object"},{"type":"null"}],"description":"Sum over the items that have data. null when no item has data; {\"trace\":true} when every item is trace."},"trace_in":{"description":"Names of the items reported as trace (Tr) for this nutrient; they add a tiny, unquantified amount.","items":{"type":"string"},"type":"array"},"unit":{"description":"Unit of total.","type":"string"}},"required":["key","label_pt","unit","total","is_lower_bound","not_analyzed_in","trace_in"],"type":"object"},"type":"array"}},"required":["items","total_grams","totals","complete","notes","source"],"type":"object"},"title":"Calculate the nutrients of a meal"},{"annotations":{"readOnlyHint":true},"description":"Compare 2 to 10 TACO foods (ids from search_food) on chosen nutrients, per 100 g of edible portion. Missing data stays null or {\"trace\":true}; do not rank a food with null as having less.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"food_ids":{"description":"TACO food numbers to compare, as returned by search_food.","items":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"maxItems":10,"minItems":2,"type":"array"},"nutrients":{"description":"Nutrient keys to compare. Omit for energy, protein, fat, carbohydrate, fiber and sodium.","items":{"enum":["moisture_pct","energy_kcal","energy_kj","protein_g","lipids_g","cholesterol_mg","carbohydrate_g","dietary_fiber_g","ash_g","calcium_mg","magnesium_mg","manganese_mg","phosphorus_mg","iron_mg","sodium_mg","potassium_mg","copper_mg","zinc_mg","retinol_mcg","re_mcg","rae_mcg","thiamine_mg","riboflavin_mg","pyridoxine_mg","niacin_mg","vitamin_c_mg"],"type":"string"},"minItems":1,"type":"array"}},"required":["food_ids"],"type":"object"},"name":"compare_foods","outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"basis":{"description":"Quantity all values refer to.","type":"string"},"foods":{"description":"The foods compared, in the order received.","items":{"additionalProperties":false,"properties":{"category":{"description":"TACO food group.","type":"string"},"id":{"description":"TACO food number.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"description":"Food name exactly as in the TACO table.","type":"string"}},"required":["id","name","category"],"type":"object"},"type":"array"},"notes":{"description":"Caveats about this answer.","items":{"type":"string"},"type":"array"},"nutrients":{"description":"One row per requested nutrient, in table order.","items":{"additionalProperties":false,"properties":{"key":{"description":"Nutrient key.","type":"string"},"label_pt":{"description":"Nutrient name in Portuguese.","type":"string"},"unit":{"description":"Unit of the values.","type":"string"},"values":{"description":"One value per food, in the same order as foods.","items":{"anyOf":[{"type":"number"},{"additionalProperties":false,"properties":{"trace":{"const":true,"type":"boolean"}},"required":["trace"],"type":"object"},{"type":"null"}],"description":"A number in the nutrient unit; {\"trace\":true} when the table reports a trace (Tr, below the quantification limit); null when the TACO table publishes no value (not analyzed, not applicable or under re-evaluation). Never read null or trace as 0."},"type":"array"}},"required":["key","label_pt","unit","values"],"type":"object"},"type":"array"},"source":{"description":"Citation for the data.","type":"string"}},"required":["basis","foods","nutrients","notes","source"],"type":"object"},"title":"Compare foods side by side"},{"annotations":{"readOnlyHint":true},"description":"Convert a Brazilian household measure (e.g. 2 colheres de sopa, 1 unidade, 1 fatia) of a TACO food to grams, using the IBGE POF table through a hand-curated mapping. Only some foods are covered; it never guesses: on ambiguity it returns candidates, and for uncovered foods or measures it says so. Pass food_id (from search_food) or food_query.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"food_id":{"description":"TACO food number, as returned by search_food. Preferred over food_query.","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"food_query":{"description":"Food name in Portuguese, used only when food_id is not given; must match exactly one food.","maxLength":200,"minLength":1,"type":"string"},"measure":{"description":"Household measure in Portuguese, e.g. \"colher de sopa\", \"unidade\", \"fatia\", \"concha\", \"copo americano\".","maxLength":100,"minLength":1,"type":"string"},"quantity":{"description":"How many of the measure (default 1; may be fractional, e.g. 0.5).","exclusiveMinimum":0,"maximum":1000,"type":"number"}},"required":["measure"],"type":"object"},"name":"convert_household_measure","outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"available_measures":{"description":"Measures known for this food (status unknown_measure).","items":{"additionalProperties":false,"properties":{"grams":{"description":"Weight of one measure in grams.","type":"number"},"key":{"description":"Stable measure key.","type":"string"},"label":{"description":"Measure name in Portuguese.","type":"string"}},"required":["key","label","grams"],"type":"object"},"type":"array"},"candidates":{"description":"Foods matching the query (status ambiguous_food), best first.","items":{"additionalProperties":false,"properties":{"has_household_measures":{"description":"Whether this food can be converted.","type":"boolean"},"id":{"description":"TACO food number.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"description":"Food name exactly as in the TACO table.","type":"string"}},"required":["id","name","has_household_measures"],"type":"object"},"type":"array"},"food":{"additionalProperties":false,"description":"The resolved food (not set for ambiguous_food / no_food_match).","properties":{"id":{"description":"TACO food number.","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"description":"Food name exactly as in the TACO table.","type":"string"}},"required":["id","name"],"type":"object"},"grams":{"description":"quantity x grams_per_measure (status ok).","type":"number"},"grams_per_measure":{"description":"Weight of one measure in grams (status ok).","type":"number"},"household_source":{"description":"Citation for the household measure weights.","type":"string"},"measure":{"additionalProperties":false,"description":"The matched household measure (status ok).","properties":{"key":{"description":"Stable measure key.","type":"string"},"label":{"description":"Measure name in Portuguese.","type":"string"},"source_description":{"description":"Description of the POF row the weight comes from.","type":"string"}},"required":["key","label","source_description"],"type":"object"},"notes":{"description":"Caveats and next steps.","items":{"type":"string"},"type":"array"},"quantity":{"description":"How many of the measure (status ok).","type":"number"},"source":{"description":"Citation for the nutrient table.","type":"string"},"status":{"description":"ok: grams computed. ambiguous_food: the query matched several foods, pick an id from candidates. no_food_match: no food found. no_household_data: this food has no curated household measures, ask for grams. unknown_measure: use one of available_measures.","enum":["ok","ambiguous_food","no_food_match","no_household_data","unknown_measure"],"type":"string"}},"required":["status","notes","source","household_source"],"type":"object"},"title":"Convert a household measure to grams"}]}}}
