Encode a food description as a FoodEx2 code
encodeTurn one English food description (a food, drink, dish or meal) into a FoodEx2 code from the EFSA MTX catalogue: base term, facet descriptors for stated attributes the term does not imply, and labelled free text for what the code cannot express. Returns a short explanation of how the code was reached. Takes a few seconds for a direct name match, typically 15–25 seconds when the catalogue must be walked.
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": {
"description": "<description>"
},
"name": "encode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| country | No | The country the food description comes from, as a two-letter ISO 3166-1 alpha-2 country code, e.g. US, GB (United Kingdom) or IT, or EU for the European Union. Food names can mean different foods in different countries. When omitted, the encode assumes the European Union. | |
| description | Yes | The food description, e.g. 'fried rice with chicken' (at most 300 characters) |