You're viewing a demo portfolio

Join the waitlist
PRSM

faostat_resolve_codes

Active

Tool of io.github.cyanheads/faostat-mcp-server

declared in 0.1.5

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."
    }
  }
}

What this tool wraps· 1 endpoint

min confidence0.700.50

Parent server

io.github.cyanheads/faostat-mcp-server

https://github.com/cyanheads/faostat-mcp-server

1/7 registries
View full server →
faostat_resolve_codes — io.github.cyanheads/faostat-mcp-server — PRSM MCP