faostat_resolve_codes
ActiveTool of io.github.cyanheads/faostat-mcp-server
Resolve human terms to the opaque integer codes faostat_query_observations needs, within a dimension: areas (countries/regions), items (commodities), or elements (metrics like production, yield, import quantity). Pass `query` for fuzzy full-text matching ("maize" → item 56), `name_contains` for a substring filter, or `code` for an exact-code lookup; omit all three to list the whole dimension. Every area match is flagged `country` or `aggregate` — aggregates (World, continents, economic groupings; codes ≥ 5000) double-count if summed with their member countries, so resolve before querying and exclude aggregates unless you want the regional roll-up.
Parameters schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"domain",
"dimension"
],
"properties": {
"code": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"description": "Exact code lookup. Takes precedence over `query`/`name_contains` when provided."
},
"limit": {
"type": "integer",
"default": 50,
"maximum": 200,
"minimum": 1,
"description": "Maximum matches to return (max 200)."
},
"query": {
"type": "string",
"description": "Full-text search term, FTS5-matched against the dimension labels with prefix matching (e.g. \"wheat\", \"import quantity\"). Relevance-ranked."
},
"domain": {
"type": "string",
"minLength": 1,
"description": "FAOSTAT domain code to verify the index is ready (e.g. \"QCL\"). Dimension code lists (areas, items, elements) are shared across all indexed domains."
},
"dimension": {
"enum": [
"area",
"item",
"element"
],
"type": "string",
"description": "Which dimension to resolve: \"area\" (countries/regions), \"item\" (commodities), or \"element\" (metrics)."
},
"name_contains": {
"type": "string",
"description": "Case-insensitive substring filter over the label. Used only when `query` is omitted."
}
}
}No endpoints wrapped at confidence ≥ 0.70.
Parent server
io.github.cyanheads/faostat-mcp-server
https://github.com/cyanheads/faostat-mcp-server
1/7 registries