{
  "notice": "bxzxxr MCP archive: a record of what public MCP servers declared when we listed them (we never call their tools). It is data, not a rating: nothing here says a server is safe, secure, verified or trustworthy, and a server can change after we looked. Secrets we detected are redacted; redacted tool lists are withheld and only their hash is shown.",
  "infrastructure": {
    "host": "faostat.caseyjhand.com",
    "site": "caseyjhand.com",
    "addresses": [
      {
        "address": "104.26.11.117",
        "endpoints": 131,
        "shared_infrastructure": true,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "104.26.0.0/20",
          "country": "US"
        }
      },
      {
        "address": "172.67.72.95",
        "endpoints": 131,
        "shared_infrastructure": true,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "172.67.64.0/20",
          "country": "US"
        }
      },
      {
        "address": "104.26.10.117",
        "endpoints": 131,
        "shared_infrastructure": true,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "104.26.0.0/20",
          "country": "US"
        }
      },
      {
        "address": "2606:4700:20::ac43:485f",
        "endpoints": 131,
        "shared_infrastructure": true,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "2606:4700:20::/44",
          "country": "US"
        }
      },
      {
        "address": "2606:4700:20::681a:a75",
        "endpoints": 131,
        "shared_infrastructure": true,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "2606:4700:20::/44",
          "country": "US"
        }
      },
      {
        "address": "2606:4700:20::681a:b75",
        "endpoints": 131,
        "shared_infrastructure": true,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "2606:4700:20::/44",
          "country": "US"
        }
      }
    ],
    "addresses_recorded": true,
    "address_history": [
      {
        "addresses": [
          "104.26.11.117",
          "172.67.72.95",
          "104.26.10.117",
          "2606:4700:20::ac43:485f",
          "2606:4700:20::681a:a75",
          "2606:4700:20::681a:b75"
        ],
        "first_seen": "2026-11-22T20:14:01.692Z",
        "last_seen": "2026-11-22T20:14:01.692Z",
        "checks": 1
      },
      {
        "addresses": [
          "104.26.11.117",
          "172.67.72.95",
          "104.26.10.117",
          "2606:4700:20::681a:b75",
          "2606:4700:20::681a:a75",
          "2606:4700:20::ac43:485f"
        ],
        "first_seen": "2026-11-21T15:52:01.179Z",
        "last_seen": "2026-11-21T15:52:01.179Z",
        "checks": 1
      }
    ],
    "hosting": [
      {
        "value": "Cloudflare",
        "evidence": "Server header \"cloudflare\""
      }
    ],
    "software": [],
    "server_info": {
      "name": "faostat-mcp-server",
      "version": "0.7.2",
      "protocol_version": "2025-06-18"
    },
    "headers": {
      "server": "cloudflare",
      "strict-transport-security": "max-age=63072000; includeSubDomains; preload",
      "access-control-allow-origin": "*"
    },
    "auth": null
  },
  "related": {
    "same_address": {
      "total": 130,
      "sample": [
        {
          "id": "6671",
          "url": "https://mcp.amperis.com/mcp",
          "server_name": "com.amperis/catalog",
          "last_state": "listed",
          "last_checked_at": "2026-11-23T07:49:03.164Z"
        },
        {
          "id": "28574",
          "url": "https://art-institute-chicago.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/art-institute-chicago-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:36:02.219Z"
        },
        {
          "id": "28575",
          "url": "https://arxiv.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/arxiv-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:37:01.411Z"
        },
        {
          "id": "28576",
          "url": "https://astronomy.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/astronomy-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:38:01.840Z"
        },
        {
          "id": "28577",
          "url": "https://aviation-weather.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/aviation-weather-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:39:01.575Z"
        },
        {
          "id": "28578",
          "url": "https://biorxiv.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/biorxiv-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:40:02.169Z"
        },
        {
          "id": "28579",
          "url": "https://bls-labor.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/bls-labor-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:41:01.131Z"
        },
        {
          "id": "28580",
          "url": "https://bluesky.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/bluesky-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:42:01.856Z"
        },
        {
          "id": "28581",
          "url": "https://brapi.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/brapi-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:43:01.729Z"
        },
        {
          "id": "28582",
          "url": "https://browser-compat.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/browser-compat-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:44:06.619Z"
        },
        {
          "id": "28583",
          "url": "https://calculator.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/calculator-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:45:03.772Z"
        },
        {
          "id": "28584",
          "url": "https://canada-parliament.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/canada-parliament-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:46:02.033Z"
        },
        {
          "id": "28585",
          "url": "https://cdc.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/cdc-health-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:47:01.894Z"
        },
        {
          "id": "28586",
          "url": "https://census.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/census-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:48:01.794Z"
        },
        {
          "id": "28587",
          "url": "https://cern-inspire.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/cern-inspire-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:49:02.069Z"
        },
        {
          "id": "28588",
          "url": "https://cern-opendata.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/cern-opendata-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:50:02.886Z"
        },
        {
          "id": "28589",
          "url": "https://chembl.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/chembl-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:51:01.709Z"
        },
        {
          "id": "28590",
          "url": "https://cisa-cybersecurity.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/cisa-cybersecurity-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:52:01.906Z"
        },
        {
          "id": "28591",
          "url": "https://clinicaltrials.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/clinicaltrialsgov-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:53:01.814Z"
        },
        {
          "id": "28592",
          "url": "https://college-scorecard.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/college-scorecard-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:54:10.959Z"
        }
      ]
    },
    "same_site": {
      "total": 133,
      "sample": [
        {
          "id": "28574",
          "url": "https://art-institute-chicago.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/art-institute-chicago-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:36:02.219Z"
        },
        {
          "id": "28575",
          "url": "https://arxiv.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/arxiv-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:37:01.411Z"
        },
        {
          "id": "28576",
          "url": "https://astronomy.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/astronomy-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:38:01.840Z"
        },
        {
          "id": "28577",
          "url": "https://aviation-weather.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/aviation-weather-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:39:01.575Z"
        },
        {
          "id": "28578",
          "url": "https://biorxiv.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/biorxiv-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:40:02.169Z"
        },
        {
          "id": "28579",
          "url": "https://bls-labor.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/bls-labor-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:41:01.131Z"
        },
        {
          "id": "28580",
          "url": "https://bluesky.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/bluesky-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:42:01.856Z"
        },
        {
          "id": "28581",
          "url": "https://brapi.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/brapi-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:43:01.729Z"
        },
        {
          "id": "28582",
          "url": "https://browser-compat.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/browser-compat-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:44:06.619Z"
        },
        {
          "id": "28583",
          "url": "https://calculator.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/calculator-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:45:03.772Z"
        },
        {
          "id": "28584",
          "url": "https://canada-parliament.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/canada-parliament-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:46:02.033Z"
        },
        {
          "id": "28585",
          "url": "https://cdc.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/cdc-health-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:47:01.894Z"
        },
        {
          "id": "28586",
          "url": "https://census.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/census-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:48:01.794Z"
        },
        {
          "id": "28587",
          "url": "https://cern-inspire.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/cern-inspire-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:49:02.069Z"
        },
        {
          "id": "28588",
          "url": "https://cern-opendata.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/cern-opendata-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:50:02.886Z"
        },
        {
          "id": "28589",
          "url": "https://chembl.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/chembl-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:51:01.709Z"
        },
        {
          "id": "28590",
          "url": "https://cisa-cybersecurity.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/cisa-cybersecurity-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:52:01.906Z"
        },
        {
          "id": "28591",
          "url": "https://clinicaltrials.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/clinicaltrialsgov-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:53:01.814Z"
        },
        {
          "id": "28592",
          "url": "https://college-scorecard.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/college-scorecard-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:54:10.959Z"
        },
        {
          "id": "28593",
          "url": "https://congressgov.caseyjhand.com/mcp",
          "server_name": "io.github.cyanheads/congressgov-mcp-server",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T19:55:03.324Z"
        }
      ]
    },
    "same_tool_list": {
      "total": 0,
      "sample": []
    },
    "same_publisher": {
      "publisher": "io.github.cyanheads",
      "total": 165,
      "sample": [
        {
          "name": "io.github.cyanheads/anime-mcp-server",
          "title": null
        },
        {
          "name": "io.github.cyanheads/art-institute-chicago-mcp-server",
          "title": null
        },
        {
          "name": "io.github.cyanheads/arxiv-mcp-server",
          "title": null
        },
        {
          "name": "io.github.cyanheads/astronomy-mcp-server",
          "title": null
        },
        {
          "name": "io.github.cyanheads/attack-surface-mcp-server",
          "title": null
        },
        {
          "name": "io.github.cyanheads/aviation-weather-mcp-server",
          "title": null
        },
        {
          "name": "io.github.cyanheads/biorxiv-mcp-server",
          "title": null
        },
        {
          "name": "io.github.cyanheads/bls-labor-mcp-server",
          "title": null
        },
        {
          "name": "io.github.cyanheads/bls-mcp-server",
          "title": null
        },
        {
          "name": "io.github.cyanheads/bluesky-mcp-server",
          "title": null
        },
        {
          "name": "io.github.cyanheads/brapi-mcp-server",
          "title": null
        },
        {
          "name": "io.github.cyanheads/browser-compat-mcp-server",
          "title": null
        },
        {
          "name": "io.github.cyanheads/calculator-mcp-server",
          "title": null
        },
        {
          "name": "io.github.cyanheads/canada-parliament-mcp-server",
          "title": null
        },
        {
          "name": "io.github.cyanheads/cdc-health-mcp-server",
          "title": null
        },
        {
          "name": "io.github.cyanheads/census-mcp-server",
          "title": null
        },
        {
          "name": "io.github.cyanheads/cern-inspire-mcp-server",
          "title": "cern-inspire-mcp-server"
        },
        {
          "name": "io.github.cyanheads/cern-opendata-mcp-server",
          "title": null
        },
        {
          "name": "io.github.cyanheads/chembl-mcp-server",
          "title": null
        },
        {
          "name": "io.github.cyanheads/cisa-cybersecurity-mcp-server",
          "title": null
        }
      ]
    },
    "same_repository": {
      "repository_url": "https://github.com/cyanheads/faostat-mcp-server",
      "total": 0,
      "sample": []
    },
    "note": "Shared addresses on big platforms (Cloudflare, Vercel and the like) put unrelated servers together; those are marked shared_infrastructure. A match is a pivot, not a link between operators."
  },
  "endpoint": {
    "id": "28612",
    "server_name": "io.github.cyanheads/faostat-mcp-server",
    "url": "https://faostat.caseyjhand.com/mcp",
    "host": "faostat.caseyjhand.com",
    "transport": "streamable-http",
    "last_checked_at": "2026-11-22T20:14:01.692Z",
    "last_state": "listed",
    "last_detail": null,
    "consecutive_failures": 0,
    "current_sha": "3f11773e901f403a9b288ee14ec90e94c8c7613ea5b8612a12fa0e9087db501a",
    "first_listed_at": "2026-11-21T15:52:01.179Z",
    "created_at": "2026-11-21T09:30:13.357Z",
    "resolved_addresses": [
      "104.26.11.117",
      "172.67.72.95",
      "104.26.10.117",
      "2606:4700:20::ac43:485f",
      "2606:4700:20::681a:a75",
      "2606:4700:20::681a:b75"
    ]
  },
  "server": {
    "name": "io.github.cyanheads/faostat-mcp-server",
    "title": null,
    "description": "UN FAOSTAT global food & agriculture statistics over a local SQLite mirror, via MCP.",
    "version": "0.7.2",
    "registry_status": "active",
    "repository_url": "https://github.com/cyanheads/faostat-mcp-server",
    "website_url": null,
    "published_at": "2026-11-20T22:55:26.336Z",
    "updated_at": "2026-11-20T22:55:26.336Z",
    "first_seen": "2026-11-21T09:30:12.897Z"
  },
  "other_endpoints": [],
  "intel": {
    "capabilities": [],
    "evm_addresses": [],
    "chains": [],
    "tokens": [],
    "computed_at": "2026-11-22T15:41:12.503Z"
  },
  "operator": {
    "key": "caseyjhand.com",
    "name": "caseyjhand.com",
    "platform": false,
    "marketplace": false
  },
  "needs_sign_in": false,
  "reachability": {
    "window_days": 30,
    "checks": 2,
    "answered": 2,
    "answered_percent": 100,
    "avg_listing_latency_ms": 771,
    "first_check_in_window": "2026-11-21T15:52:01.179Z",
    "consecutive_failures_now": 0,
    "days": [
      {
        "day": "2026-11-21",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      },
      {
        "day": "2026-11-22",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      }
    ]
  },
  "tool_list": {
    "sha256": "3f11773e901f403a9b288ee14ec90e94c8c7613ea5b8612a12fa0e9087db501a",
    "tools": 6,
    "resources": 1,
    "prompts": 0,
    "first_seen": "2026-11-21T15:52:01.996Z",
    "tool_names": [
      "faostat_list_domains",
      "faostat_resolve_codes",
      "faostat_query_observations",
      "faostat_commodity_profile",
      "faostat_dataframe_query",
      "faostat_dataframe_describe"
    ],
    "declared": {
      "tools": [
        {
          "name": "faostat_list_domains",
          "title": "faostat-mcp-server: list domains",
          "description": "Discover FAOSTAT statistical domains (production, trade, food balances, food security, land use, agri-emissions, prices, value) with their codes, descriptions, last-update date, upstream row count, and local index status. Every query keys on a domain code from here. The `indexed` flag tells you which domains are queryable right now; un-indexed domains exist in the catalog but must be added to FAOSTAT_DOMAINS and re-synced before faostat_query_observations can read them. The catalog runs to ~69 domains with long descriptions, so responses are paged: narrow with `topic` / `indexed_only`, pass `code` to fetch one domain outright, or page with `offset` + `limit` — when the response reports `truncated`, pass the returned `nextOffset` to fetch the rest.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "code": {
                "type": "string",
                "description": "Exact domain code lookup (e.g. \"RL\"), case-insensitive. Returns that one domain's full record on a single page. Takes precedence over `topic` / `indexed_only` when provided."
              },
              "limit": {
                "type": "integer",
                "default": 20,
                "minimum": 1,
                "description": "Domains to return on this page, at most 200 per call — above the catalog size, so raise it to fetch everything at once. Domain descriptions are long; the default keeps a browse call small."
              },
              "topic": {
                "type": "string",
                "description": "Case-insensitive substring filter over domain code, name, and topic (e.g. \"trade\", \"emissions\", \"QCL\"). Omit to list the full catalog."
              },
              "offset": {
                "type": "integer",
                "default": 0,
                "maximum": 9007199254740991,
                "minimum": 0,
                "description": "Zero-based pagination offset into the matching domains (code-sorted). When the response reports truncated, pass the returned nextOffset here to fetch the next page. Ignored for exact-code lookups (always single-page)."
              },
              "indexed_only": {
                "type": "boolean",
                "default": false,
                "description": "When true, return only domains indexed in the local mirror (queryable now)."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "not": {
                  "required": [
                    "error"
                  ]
                },
                "required": [
                  "domains",
                  "totalCount",
                  "totalMatches",
                  "truncated",
                  "indexedCount"
                ]
              },
              {
                "required": [
                  "error"
                ]
              }
            ],
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "error": {
                "type": "object",
                "required": [
                  "code",
                  "message"
                ],
                "properties": {
                  "code": {
                    "type": "integer",
                    "maximum": 9007199254740991,
                    "minimum": -9007199254740991,
                    "description": "JSON-RPC error code for this failure."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "type": "string",
                        "description": "Machine-readable failure mode."
                      },
                      "recovery": {
                        "type": "object",
                        "required": [
                          "hint"
                        ],
                        "properties": {
                          "hint": {
                            "type": "string"
                          }
                        },
                        "description": "Actionable next step for the caller.",
                        "additionalProperties": {}
                      },
                      "retryable": {
                        "type": "boolean",
                        "description": "Whether retrying may succeed."
                      }
                    },
                    "additionalProperties": {}
                  },
                  "message": {
                    "type": "string",
                    "description": "Human-readable description of what went wrong."
                  }
                },
                "description": "Present when the call failed. Absent on success.",
                "additionalProperties": {}
              },
              "notice": {
                "type": "string",
                "description": "Guidance when limit was above its cap, a filter matched nothing, more pages remain, or no domains are indexed yet."
              },
              "domains": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "code",
                    "name",
                    "last_update",
                    "indexed",
                    "index_ready"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "description": "Domain code — the key for every query (e.g. \"QCL\")."
                    },
                    "name": {
                      "type": "string",
                      "description": "Human-readable domain name."
                    },
                    "topic": {
                      "type": "string",
                      "description": "FAOSTAT topic grouping, when provided."
                    },
                    "indexed": {
                      "type": "boolean",
                      "description": "True when this domain is in the local mirror selection (FAOSTAT_DOMAINS)."
                    },
                    "description": {
                      "type": "string",
                      "description": "Domain description, when provided."
                    },
                    "index_ready": {
                      "type": "boolean",
                      "description": "True when the local mirror for this domain has completed an initial sync."
                    },
                    "last_update": {
                      "type": "string",
                      "description": "Upstream last-update date (ISO 8601) from the manifest."
                    },
                    "indexed_last_sync": {
                      "type": "string",
                      "description": "ISO 8601 timestamp of the last completed local sync (when synced)."
                    },
                    "indexed_row_count": {
                      "type": "number",
                      "description": "Rows in the local mirror for this domain (present when indexed and synced)."
                    },
                    "file_size_in_bytes": {
                      "type": "number",
                      "description": "Compressed ZIP size in bytes, parsed from the manifest size string."
                    },
                    "upstream_row_count": {
                      "type": "number",
                      "description": "Row count reported by the manifest for the full domain."
                    }
                  },
                  "description": "One FAOSTAT domain with catalog metadata and local mirror status.",
                  "additionalProperties": false
                },
                "description": "Matching domains, sorted by code."
              },
              "truncated": {
                "type": "boolean",
                "description": "True when more matches remain beyond the returned page — fetch them with nextOffset."
              },
              "nextOffset": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991,
                "description": "Offset to pass on the next call to fetch the following page. Present only when truncated is true; absent on the last page and for exact-code lookups."
              },
              "totalCount": {
                "type": "number",
                "description": "Total domains in the FAOSTAT catalog, independent of any filter."
              },
              "indexedCount": {
                "type": "number",
                "description": "Domains currently indexed in the local mirror."
              },
              "totalMatches": {
                "type": "number",
                "description": "Domains matching the current filters, before the page limit is applied."
              },
              "effectiveLimit": {
                "type": "number",
                "description": "The limit the call was served at. Present only when limit was capped."
              },
              "requestedLimit": {
                "type": "number",
                "description": "The limit the call asked for. Present only when it was above the 200 cap."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "faostat_resolve_codes",
          "title": "faostat-mcp-server: resolve codes",
          "description": "Resolve labels to the numeric codes or exact alphanumeric item identities faostat_query_observations needs: areas (countries/regions), items (commodities), and elements (metrics). Use query for full-text matching, name_contains for substring matching, code or code_text for exact identity, m49_code to find areas by M49 code, or omit them to list. Item and element matches occur in the selected domain; areas use shared vocabulary. For elements, optionally pass item_codes or item_codes_text to discover metrics and distinct units observed for those items; this does not establish area/year/source coverage. Empty item selectors match nothing. Page with offset and limit using nextOffset when truncated. Areas carry country/aggregate classification and the M49 code FAO publishes for each, a standard key for joining other sources. Verified domain-specific item groups carry aggregate; null means unclassified, not safe-to-sum. Item groups can overlap their members even with matching units. Area aggregates include codes ≥ 5000 and curated roll-ups such as China=351; exclude overlapping regional and country rows when summing.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/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,
                "minimum": 1,
                "description": "Matches to return on this page, at most 200 per call."
              },
              "query": {
                "type": "string",
                "description": "Full-text search term, FTS5-matched against the dimension labels with prefix matching (e.g. \"wheat\", \"import quantity\"). Relevance-ranked. Quotes, parentheses, asterisks, and control characters separate words. Blank or \"*\" reads as omitted; any other value made only of quotes, parentheses, asterisks, and whitespace, such as \"()\", fails invalid_query. Unread when code, code_text, or m49_code is given."
              },
              "domain": {
                "type": "string",
                "minLength": 1,
                "description": "FAOSTAT domain code (e.g. \"QCL\"). Item and element resolution is scoped to the codes present in this domain's data; area code lists are shared across all indexed domains."
              },
              "offset": {
                "type": "integer",
                "default": 0,
                "maximum": 9007199254740991,
                "minimum": 0,
                "description": "Zero-based pagination offset into the match set. When the response reports truncated, pass the returned nextOffset here to fetch the next page. Ignored for exact lookups by code, code_text, or m49_code (always single-page)."
              },
              "m49_code": {
                "type": "string",
                "pattern": "^\\d{1,3}(\\.\\d+)?$",
                "description": "Exact M49 area code: one to three digits, optionally a dot and more digits, such as \"840\" or \"002.03\". The integer part is zero-padded to three digits before lookup, so \"40\" reads as \"040\". Returns every area carrying the code on one page. Only for dimension area; mutually exclusive with code and code_text; takes precedence over query and name_contains."
              },
              "code_text": {
                "type": "string",
                "pattern": "^\\d+[A-Za-z][A-Za-z0-9]*$",
                "description": "Exact alphanumeric item code; letters are uppercased before lookup, so 210400f reads as 210400F. Only for dimension item; mutually exclusive with code. Numeric identities use code."
              },
              "dimension": {
                "enum": [
                  "area",
                  "item",
                  "element"
                ],
                "type": "string",
                "description": "Which dimension to resolve: \"area\" (countries/regions), \"item\" (commodities), or \"element\" (metrics)."
              },
              "item_codes": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "maximum": 9007199254740991,
                  "minimum": -9007199254740991
                },
                "description": "For element resolution only: restrict elements and units to these items. Empty matches nothing; omit for domain-wide elements. Mutually exclusive with item_codes_text."
              },
              "name_contains": {
                "type": "string",
                "description": "Case-insensitive substring filter over the label. Used only when `query` is omitted."
              },
              "item_codes_text": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^\\d+[A-Za-z][A-Za-z0-9]*$",
                  "description": "Exact alphanumeric item identity."
                },
                "description": "For element resolution only: restrict elements and units to these exact text items, letters uppercased before lookup. Empty matches nothing; mutually exclusive with item_codes."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "not": {
                  "required": [
                    "error"
                  ]
                },
                "required": [
                  "domain",
                  "dimension",
                  "matches",
                  "totalMatches",
                  "truncated"
                ]
              },
              {
                "required": [
                  "error"
                ]
              }
            ],
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "error": {
                "type": "object",
                "required": [
                  "code",
                  "message"
                ],
                "properties": {
                  "code": {
                    "type": "integer",
                    "maximum": 9007199254740991,
                    "minimum": -9007199254740991,
                    "description": "JSON-RPC error code for this failure."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "type": "string",
                        "examples": [
                          "invalid_item_scope",
                          "invalid_text_selector",
                          "invalid_m49_selector",
                          "invalid_query",
                          "unknown_domain",
                          "index_not_ready",
                          "query_timeout",
                          "pool_closed"
                        ],
                        "description": "Machine-readable failure mode. Declared by this tool: `invalid_item_scope`: Item selectors are combined or supplied outside element resolution. `invalid_text_selector`: code_text is supplied with code or outside the item dimension. `invalid_m49_selector`: m49_code is supplied outside the area dimension, or with code or code_text. `invalid_query`: No code, code_text, or m49_code was given, and query is made only of quotes, parentheses, asterisks, and whitespace, such as \"()\" or \"**\", so no search term is left. A lone \"*\" lists instead. `unknown_domain`: The domain code is not a selected (indexed) FAOSTAT domain. `index_not_ready`: The shared dimension tables are empty, or the selected item/element domain requires an initial sync or an ingest upgrade. `query_timeout`: The lookup's mirror read — time queued behind other calls' reads plus execution — ran past the 45-second per-call ceiling. `pool_closed`: The server was shutting down and closed its mirror read workers while this call was queued or running. Other values are possible when a failure originates below the handler."
                      },
                      "recovery": {
                        "type": "object",
                        "required": [
                          "hint"
                        ],
                        "properties": {
                          "hint": {
                            "type": "string"
                          }
                        },
                        "description": "Actionable next step for the caller.",
                        "additionalProperties": {}
                      },
                      "retryable": {
                        "type": "boolean",
                        "description": "Whether retrying may succeed."
                      }
                    },
                    "additionalProperties": {}
                  },
                  "message": {
                    "type": "string",
                    "description": "Human-readable description of what went wrong."
                  }
                },
                "description": "Present when the call failed. Absent on success.",
                "additionalProperties": {}
              },
              "domain": {
                "type": "string",
                "description": "The domain code echoed back."
              },
              "notice": {
                "type": "string",
                "description": "Guidance when limit was above its cap, nothing matched, more pages remain, or the dimension is not yet indexed."
              },
              "matches": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "code",
                    "code_text",
                    "name",
                    "kind"
                  ],
                  "properties": {
                    "code": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Numeric code for faostat_query_observations; null for alphanumeric items carried by code_text."
                    },
                    "kind": {
                      "anyOf": [
                        {
                          "enum": [
                            "country",
                            "aggregate"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "For areas: country or aggregate region. For items: aggregate only for verified domain-specific groups; null means unclassified, never safe-to-sum. Null for elements."
                    },
                    "name": {
                      "type": "string",
                      "description": "Human-readable label."
                    },
                    "units": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "description": "Observed unit label."
                      },
                      "description": "Element matches only: distinct non-null units observed in the selected domain and item scope. Empty means no specified units."
                    },
                    "cpc_code": {
                      "type": "string",
                      "description": "CPC crosswalk code for items (apostrophe stripped), when available."
                    },
                    "m49_code": {
                      "type": "string",
                      "description": "Areas only: FAO's published M49 code, a string with its leading zeros (840, 001). The excluding-intra-trade aggregates carry dotted FAO extensions such as 002.03, and historical entities their former codes. Absent for items and elements, and for an area whose code list carries none."
                    },
                    "code_text": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Exact alphanumeric item identity for item_codes_text; null for numeric codes."
                    }
                  },
                  "description": "One resolved code match.",
                  "additionalProperties": false
                },
                "description": "Matching codes, relevance-ranked for query mode, else by code."
              },
              "dimension": {
                "type": "string",
                "description": "The dimension resolved."
              },
              "truncated": {
                "type": "boolean",
                "description": "True when more matches remain beyond the returned page — fetch them with nextOffset."
              },
              "nextOffset": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991,
                "description": "Offset to pass on the next call to fetch the following page. Present only when truncated is true; absent on the last page and for exact-code lookups."
              },
              "totalMatches": {
                "type": "number",
                "description": "Total matches in this domain before the result cap."
              },
              "effectiveLimit": {
                "type": "number",
                "description": "The limit the call was served at. Present only when limit was capped."
              },
              "requestedLimit": {
                "type": "number",
                "description": "The limit the call asked for. Present only when it was above the 200 cap."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "faostat_query_observations",
          "title": "faostat-mcp-server: query observations",
          "description": "Query a FAOSTAT domain's data cube by area(s), item(s), element(s), sources, and year range, returning values with units and data-quality flags. Resolve numeric codes or exact alphanumeric item identities with faostat_resolve_codes; element resolution accepts item selectors and returns units. Empty queries with explicit items and elements list available elements for those items across the domain, without establishing area/year/source coverage. Aggregate regions are excluded by default; include_aggregates=true returns roll-ups, and explicit area_codes are honored verbatim. Item groups can overlap their members even with matching units; they remain included, and kind=null does not establish safe-to-sum. Keep source methodologies separate. Returns up to limit rows from offset, in year order; pass nextOffset back as offset for the next page, up to offset 100000, and partition a larger match by year or codes. With DataCanvas on, a first page (offset 0) whose match exceeds limit also stages the whole match to a DataCanvas table (canvas_id + table_name); call faostat_dataframe_describe for its columns, then faostat_dataframe_query for SQL over every row. Honor every row's flag: commonly A=Official, B=time-series break, E=Estimated, I=Imputed, M=Missing, T=Unofficial, X=international organization; unrecognized flags never establish official status.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "required": [
              "domain"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 200,
                "minimum": 1,
                "description": "Observations per page, at most 1000 per call. Rows past the page are never dropped silently: nextOffset continues from them, and with DataCanvas on a first page (offset 0) whose match exceeds limit also stages the whole match to a canvas table (canvas_id + table_name)."
              },
              "domain": {
                "type": "string",
                "minLength": 1,
                "description": "FAOSTAT domain code (e.g. \"QCL\"). Must be indexed locally."
              },
              "offset": {
                "type": "integer",
                "default": 0,
                "maximum": 100000,
                "minimum": 0,
                "description": "Zero-based position of the page’s first row in the match, in year order. Pass the nextOffset a previous call returned to fetch the following page; a page past the first stages nothing. At most 100000, so offset paging reaches the first 100000 rows of a match plus one page; to reach rows past that, partition the query by year (year_start/year_end) or narrower area_codes, item_codes, or element_codes, and page each part from offset 0."
              },
              "year_end": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991,
                "description": "Inclusive end year (e.g. 2022)."
              },
              "canvas_id": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{10}$",
                "description": "Canvas ID to stage onto, as returned by a prior faostat_query_observations / faostat_commodity_profile call — exactly 10 characters of letters, digits, hyphens, and underscores. Consulted only when this call stages: a first page whose match exceeds limit, with DataCanvas on. Omit to stage onto this session’s canvas, created on the first stage and reused by every later call, so tables staged earlier in the session sit alongside this one."
              },
              "area_codes": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "maximum": 9007199254740991,
                  "minimum": -9007199254740991
                },
                "description": "Area codes from faostat_resolve_codes. When set, aggregates are NOT auto-excluded — the codes are honored verbatim."
              },
              "item_codes": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "maximum": 9007199254740991,
                  "minimum": -9007199254740991
                },
                "description": "Item codes from faostat_resolve_codes."
              },
              "year_start": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991,
                "description": "Inclusive start year (e.g. 2000)."
              },
              "source_codes": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "maximum": 9007199254740991,
                  "minimum": -9007199254740991
                },
                "description": "Exact source codes, such as 3050 or 3051 in GLE. Omit to return every methodology; choose or group sources before summing."
              },
              "element_codes": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "maximum": 9007199254740991,
                  "minimum": -9007199254740991
                },
                "description": "Element codes from faostat_resolve_codes (e.g. 5510 Production)."
              },
              "item_codes_text": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^\\d+[A-Za-z][A-Za-z0-9]*$",
                  "description": "Exact alphanumeric item code."
                },
                "description": "Exact alphanumeric item identities from resolver code_text; letters are uppercased before the query, so 210400f reads as 210400F. Mutually exclusive with item_codes. Numeric codes use item_codes."
              },
              "include_aggregates": {
                "type": "boolean",
                "default": false,
                "description": "When false (default), exclude aggregate-region rows (codes ≥ 5000 plus a few curated sub-threshold roll-ups such as China=351) so sums are not double-counted. Set true for World/continent/grouping roll-ups. Ignored when explicit area_codes are passed."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "not": {
                  "required": [
                    "error"
                  ]
                },
                "required": [
                  "domain",
                  "observations",
                  "spilled",
                  "truncated",
                  "totalCount"
                ]
              },
              {
                "required": [
                  "error"
                ]
              }
            ],
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "error": {
                "type": "object",
                "required": [
                  "code",
                  "message"
                ],
                "properties": {
                  "code": {
                    "type": "integer",
                    "maximum": 9007199254740991,
                    "minimum": -9007199254740991,
                    "description": "JSON-RPC error code for this failure."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "type": "string",
                        "examples": [
                          "conflicting_item_selectors",
                          "domain_not_indexed",
                          "index_not_ready",
                          "canvas_not_found",
                          "invalid_year_range",
                          "query_timeout",
                          "pool_closed"
                        ],
                        "description": "Machine-readable failure mode. Declared by this tool: `conflicting_item_selectors`: Both numeric item_codes and exact item_codes_text are supplied. `domain_not_indexed`: The domain is not in the local mirror selection (FAOSTAT_DOMAINS) — whether a valid FAOSTAT code or not. `index_not_ready`: The domain mirror requires an initial sync or an ingest upgrade. `canvas_not_found`: A first page (offset 0) whose match exceeds limit stages with DataCanvas on, and canvas_id does not resolve to a live canvas — unknown, expired, or owned by another tenant. A page that holds the whole match, any offset above 0, and a server with DataCanvas off stage nothing and never consult canvas_id. `invalid_year_range`: year_start is greater than year_end — a self-contradictory range that can never match. `query_timeout`: The call's mirror reads — time queued behind other calls plus execution — ran past the 45-second per-call ceiling. `pool_closed`: The server was shutting down and closed its mirror read workers while this call was queued or running. Other values are possible when a failure originates below the handler."
                      },
                      "recovery": {
                        "type": "object",
                        "required": [
                          "hint"
                        ],
                        "properties": {
                          "hint": {
                            "type": "string"
                          }
                        },
                        "description": "Actionable next step for the caller.",
                        "additionalProperties": {}
                      },
                      "retryable": {
                        "type": "boolean",
                        "description": "Whether retrying may succeed."
                      }
                    },
                    "additionalProperties": {}
                  },
                  "message": {
                    "type": "string",
                    "description": "Human-readable description of what went wrong."
                  }
                },
                "description": "Present when the call failed. Absent on success.",
                "additionalProperties": {}
              },
              "domain": {
                "type": "string",
                "description": "The domain code echoed back."
              },
              "notice": {
                "type": "string",
                "description": "Guidance on empty results, aggregate exclusion, paging, an offset past the end, the end of offset paging, or how to reach the staged table."
              },
              "spilled": {
                "type": "boolean",
                "description": "True when the whole match was staged on a DataCanvas table — only on a first page (offset 0) whose match exceeds limit, with DataCanvas on."
              },
              "canvas_id": {
                "type": "string",
                "description": "Canvas ID holding the staged table (present when spilled) — pass it with table_name to faostat_dataframe_describe for the columns and types, then to faostat_dataframe_query for SQL."
              },
              "truncated": {
                "type": "boolean",
                "description": "True when the staged table hit the 50,000-row staging cap — the staged set is a PREFIX of the match, not the complete result. The rows past it start at offset 50000; page on from there up to offset 100000, or partition the query by year or code ranges and stage each part."
              },
              "nextOffset": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991,
                "description": "Offset of the next page — pass it back as offset to continue. Present while rows remain past this page; absent on the last page, past the end of the match, and when the next page would start past offset 100000, the deepest offset accepted (the notice then says how to reach the rest)."
              },
              "table_name": {
                "type": "string",
                "description": "Canvas table holding the staged result set (present when spilled; a PREFIX of the match when truncated) — pass it as name to faostat_dataframe_describe, then reference it in faostat_dataframe_query SQL."
              },
              "totalCount": {
                "type": "number",
                "description": "Observations the filters matched. Exact up to 50,000, and exact on the last page of any match; on any other page past 50,000 it is 50,000, a floor — more matched — and totalCountIsFloor is true. A staged first page reports the staged table row count, capped the same way (truncated is then true)."
              },
              "observations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "area_code",
                    "area",
                    "area_m49",
                    "item_code",
                    "item_code_text",
                    "period",
                    "value_qualifier",
                    "source_code",
                    "source",
                    "item",
                    "element_code",
                    "element",
                    "year",
                    "value",
                    "unit",
                    "flag"
                  ],
                  "properties": {
                    "area": {
                      "type": "string",
                      "description": "Area name."
                    },
                    "flag": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Data-quality flag — commonly A=Official, B=time-series break, E=Estimated, I=Imputed, M=Missing (value cannot exist), T=Unofficial, X=from an international organization, plus others FAOSTAT defines per domain; treat any unrecognized flag as informational, never assume official. Null when unflagged."
                    },
                    "item": {
                      "type": "string",
                      "description": "Item name."
                    },
                    "unit": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Unit of measure; null when unspecified."
                    },
                    "year": {
                      "type": "number",
                      "description": "Observation year."
                    },
                    "value": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Observed value; null when the cell is empty."
                    },
                    "period": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Original multi-year period label; null for annual rows. Year is the integer midpoint."
                    },
                    "source": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Source methodology label; null when absent."
                    },
                    "element": {
                      "type": "string",
                      "description": "Element (metric) name."
                    },
                    "area_m49": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "FAO's published M49 code for the area, a string with its leading zeros (840, 001); the excluding-intra-trade aggregates carry dotted FAO extensions such as 002.03. The same code faostat_resolve_codes reports as the area's m49_code; null when the domain file carries none."
                    },
                    "area_code": {
                      "type": "number",
                      "description": "Area code."
                    },
                    "item_code": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Numeric item code; null for alphanumeric identities."
                    },
                    "source_code": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Source methodology code; null when the domain has none."
                    },
                    "element_code": {
                      "type": "number",
                      "description": "Element code."
                    },
                    "item_code_text": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Exact alphanumeric item code; null for numeric identities."
                    },
                    "value_qualifier": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Bound operator such as <; value is a bound rather than an exact observation when present."
                    }
                  },
                  "description": "One observation. The flag is load-bearing — never drop or ignore it.",
                  "additionalProperties": false
                },
                "description": "One page of observations: up to limit rows from offset, in year order."
              },
              "effectiveLimit": {
                "type": "number",
                "description": "The limit the call was served at. Present only when limit was capped."
              },
              "requestedLimit": {
                "type": "number",
                "description": "The limit the call asked for. Present only when it was above the 1000 cap."
              },
              "staged_row_count": {
                "type": "number",
                "description": "Rows actually staged on the canvas table (present when spilled). Equals the full match count unless truncated, in which case it is the 50,000-row cap."
              },
              "totalCountIsFloor": {
                "type": "boolean",
                "description": "True when totalCount (50,000) is a floor and not the match size: more than 50,000 observations matched and this page is not the last. Absent when totalCount is exact."
              },
              "available_elements": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "code",
                    "name",
                    "units"
                  ],
                  "properties": {
                    "code": {
                      "type": "number",
                      "description": "Element code available for the selected items."
                    },
                    "name": {
                      "type": "string",
                      "description": "Element label."
                    },
                    "units": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "description": "Observed unit."
                      },
                      "description": "Distinct specified units for these items in this domain."
                    }
                  },
                  "description": "An element observed for the selected items.",
                  "additionalProperties": false
                },
                "description": "On an empty query with explicit items and elements: all elements available for those items across the domain. Does not establish coverage for requested area/year/source filters."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": false
          }
        },
        {
          "name": "faostat_commodity_profile",
          "title": "faostat-mcp-server: commodity profile",
          "description": "Assemble a global profile for one QCL item in a single call: top-producing countries, the annual trend, and trade flows (top exporters and importers). The elements follow what the item carries: Production (5510) and tonne trade quantities (5610/5910) for an item with Production; for live-animal items, which have none, their Stocks elements and every trade quantity element they carry. ranking_elements names each ranking's elements and units. Supply item_code or item_query; code wins when both are supplied. For a crop traded mostly in processed form, trade_item_code ranks the exporters and importers on that TCL item instead (rice milled equivalent 30 for paddy rice 27), with the elements still picked from the selected item. A query selects a unique normalized exact label, otherwise a unique relevance match; ambiguous queries require an explicit code. Each ranking uses the selected item at each country's own latest year with data, grouped by unit. The trend is returned inline as year/value points. Country-level only (aggregates excluded). QCL is required; unavailable TCL yields a profile without trade, with a notice. When the merged observation set is too large to inline, it spills to a DataCanvas table (canvas_id + table_name) — call faostat_dataframe_describe for its columns, then faostat_dataframe_query for deeper SQL.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "top_n": {
                "type": "integer",
                "default": 10,
                "minimum": 1,
                "description": "Rows in each ranking (top producers, exporters, importers), at most 50 per call."
              },
              "year_end": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991,
                "description": "Inclusive end year (e.g. 2022) for the rankings, the trend, and the staged rows; each area then ranks at its latest year up to this one."
              },
              "canvas_id": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{10}$",
                "description": "Canvas ID to stage onto, as returned by a prior faostat_query_observations / faostat_commodity_profile call — exactly 10 characters of letters, digits, hyphens, and underscores. Omit to stage onto this session’s canvas, created on the first spill and reused by every later call, so tables staged earlier in the session sit alongside this one."
              },
              "item_code": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": 1,
                "description": "Exact item code present in QCL; takes precedence over item_query. Obtain it from faostat_resolve_codes with domain QCL and dimension item."
              },
              "item_query": {
                "type": "string",
                "minLength": 1,
                "description": "Commodity label or search term (e.g. \"Wheat\"). A unique normalized exact QCL label wins, with \";\" and \",\" compared as one character (\"Peas, dry\" selects \"Peas; dry\"); otherwise the relevance search must match exactly one item. Broad queries such as \"maize\" or \"milk\" require item_code. Whitespace-only or \"*\" names no commodity; a value made only of quotes, parentheses, asterisks, and whitespace, such as \"()\", fails invalid_query. Supply this or item_code."
              },
              "year_start": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991,
                "description": "Inclusive start year (e.g. 1990) for the rankings, the trend, and the staged rows. An area with no data from this year on drops out of the rankings; set it to a ranking's latest year to keep only current rows."
              },
              "trade_item_code": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": 1,
                "description": "TCL item code to rank top_exporters and top_importers on instead of the selected item, for a commodity traded mostly in processed form (QCL holds paddy rice 27; its trade sits in 30, rice milled equivalent). The staged TCL rows follow it; producers and the trend stay on the selected item, and the trade elements are still those the selected item selects (5610/5910 for an item with Production). Obtain it from faostat_resolve_codes with domain TCL, dimension item, and a query naming the traded product. Omit to rank trade on the selected item."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "not": {
                  "required": [
                    "error"
                  ]
                },
                "required": [
                  "item_query",
                  "resolved_items",
                  "ranking_elements",
                  "top_producers",
                  "top_exporters",
                  "top_importers",
                  "production_trend",
                  "trend_points",
                  "spilled",
                  "truncated",
                  "resolvedItemCodes",
                  "resolvedItemMatches",
                  "itemsTruncated"
                ]
              },
              {
                "required": [
                  "error"
                ]
              }
            ],
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "error": {
                "type": "object",
                "required": [
                  "code",
                  "message"
                ],
                "properties": {
                  "code": {
                    "type": "integer",
                    "maximum": 9007199254740991,
                    "minimum": -9007199254740991,
                    "description": "JSON-RPC error code for this failure."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "type": "string",
                        "examples": [
                          "missing_item",
                          "invalid_query",
                          "ambiguous_item",
                          "no_match",
                          "trade_item_not_found",
                          "domain_not_indexed",
                          "index_not_ready",
                          "invalid_year_range",
                          "canvas_not_found",
                          "query_timeout",
                          "pool_closed"
                        ],
                        "description": "Machine-readable failure mode. Declared by this tool: `missing_item`: No item_code was supplied, and item_query was omitted, whitespace-only, or \"*\". `invalid_query`: No item_code was supplied, and item_query is made only of quotes, parentheses, asterisks, and whitespace, such as \"()\" or \"**\", so no search term is left. `ambiguous_item`: The query matches more than one QCL item without a unique exact label. `no_match`: The query matched no item, or item_code is absent from QCL. `trade_item_not_found`: trade_item_code names no item with rows in TCL. `domain_not_indexed`: The production domain (QCL) is not in the local mirror selection (FAOSTAT_DOMAINS), so there is no production data to profile. `index_not_ready`: The production domain (QCL) is selected, but its mirror is cold — its initial sync has never completed. `invalid_year_range`: year_start is greater than year_end — a self-contradictory range that can never match. The bounds reach the production, trade, and merged canvas-stream queries alike, so every one of them would return nothing. `canvas_not_found`: DataCanvas is enabled and canvas_id does not resolve to a live canvas — unknown, expired, or owned by another tenant. `query_timeout`: The profile's mirror reads (commodity resolution, rankings, trend, staging stream) — time queued behind other calls plus execution — ran past the 45-second per-call ceiling. `pool_closed`: The server was shutting down and closed its mirror read workers while this call was queued or running. Other values are possible when a failure originates below the handler."
                      },
                      "recovery": {
                        "type": "object",
                        "required": [
                          "hint"
                        ],
                        "properties": {
                          "hint": {
                            "type": "string"
                          }
                        },
                        "description": "Actionable next step for the caller.",
                        "additionalProperties": {}
                      },
                      "retryable": {
                        "type": "boolean",
                        "description": "Whether retrying may succeed."
                      }
                    },
                    "additionalProperties": {}
                  },
                  "message": {
                    "type": "string",
                    "description": "Human-readable description of what went wrong."
                  }
                },
                "description": "Present when the call failed. Absent on success.",
                "additionalProperties": {}
              },
              "notice": {
                "type": "string",
                "description": "States where the observation set went — the canvas table, inline result, staging failure, or disabled canvas — plus unavailable trade data, mixed units, or other partial-result context."
              },
              "spilled": {
                "type": "boolean",
                "description": "True when the merged observation set was staged on a canvas table."
              },
              "canvas_id": {
                "type": "string",
                "description": "Canvas ID this call staged onto. When spilled it holds table_name — pass both to faostat_dataframe_describe (table_name as name) for the columns and types, then canvas_id to faostat_dataframe_query for SQL. Also present when the merged set fit inline and no table was staged; faostat_dataframe_describe with this canvas_id then lists any tables already staged on it. Absent when the canvas is disabled or staging failed."
              },
              "truncated": {
                "type": "boolean",
                "description": "True when the STAGED CANVAS TABLE hit the 50,000-row staging cap and is therefore a PREFIX of the merged observation set — re-query faostat_query_observations partitioned by year to stage the rest. The rankings and production_trend above are SQL aggregates over the complete match and stay exact either way."
              },
              "item_query": {
                "type": "string",
                "description": "Supplied query echoed back, or the canonical selected label for code-only calls."
              },
              "table_name": {
                "type": "string",
                "description": "Canvas table holding the staged observations: the selected item’s QCL rows for the ranking_elements.top_producers elements, plus the TCL rows of trade_item (or, without it, the selected item) for the top_exporters and top_importers elements when trade contributed (present when spilled). The notice names which domains the table holds. Pass it as name to faostat_dataframe_describe for its columns (a domain column tags each row QCL or TCL), then reference it in faostat_dataframe_query SQL."
              },
              "trade_item": {
                "type": "object",
                "required": [
                  "code",
                  "name"
                ],
                "properties": {
                  "code": {
                    "type": "number",
                    "description": "TCL item code, as trade_item_code named it."
                  },
                  "name": {
                    "type": "string",
                    "description": "Item label from the shared item vocabulary."
                  }
                },
                "description": "The TCL item top_exporters, top_importers, and the staged TCL rows read, present when trade_item_code was supplied and TCL is both indexed and index_ready in faostat_list_domains (its initial sync has completed). Absent otherwise: without trade_item_code the trade rankings read the selected item, and while TCL is not indexed or not index_ready they are empty.",
                "additionalProperties": false
              },
              "trend_points": {
                "type": "number",
                "description": "Total observations aggregated into production_trend. Exact — the aggregation runs over the complete filtered match, not a capped page."
              },
              "effectiveTopN": {
                "type": "number",
                "description": "The top_n the call was served at. Present only when top_n was capped."
              },
              "requestedTopN": {
                "type": "number",
                "description": "The top_n the call asked for. Present only when it was above the 50 cap."
              },
              "top_exporters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "area_code",
                    "area",
                    "value",
                    "observations",
                    "unit",
                    "year",
                    "years_behind",
                    "flags"
                  ],
                  "properties": {
                    "area": {
                      "type": "string",
                      "description": "Country name."
                    },
                    "unit": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Unit of measure for value; null when unspecified. Rows are grouped by unit, so values in different units are never summed together — a country can appear once per unit."
                    },
                    "year": {
                      "type": "number",
                      "description": "This country's own latest year with data, computed per country — a country whose series ends earlier still ranks, at its own last reported year; years_behind says how far that trails the ranking."
                    },
                    "flags": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Distinct data-quality flags across the summed observations, comma-separated and sorted — commonly A=Official, B=time-series break, E=Estimated, I=Imputed, M=Missing (value cannot exist), T=Unofficial, X=from an international organization, plus others FAOSTAT defines per domain; treat any unrecognized flag as informational, never assume official. Null when no summed observation carried a flag. More than one flag means the total mixes data qualities."
                    },
                    "value": {
                      "type": "number",
                      "description": "Export quantity for the ranked item (trade_item, or the selected item) and country in its latest reporting year."
                    },
                    "area_code": {
                      "type": "number",
                      "description": "Country code."
                    },
                    "observations": {
                      "type": "number",
                      "description": "Observations summed into value for the ranking's item and reporting year."
                    },
                    "years_behind": {
                      "type": "integer",
                      "maximum": 9007199254740991,
                      "minimum": -9007199254740991,
                      "description": "The ranking's latest year minus year: 0 when this row is current. The ranking's latest year is the newest year among every row it matched — all countries and units within year_start/year_end — not only the rows returned. A positive value marks a series that stopped earlier, such as a dissolved state or a country that stopped reporting the item; year_start set to the ranking's latest year keeps only current rows."
                    }
                  },
                  "description": "One top-exporting country.",
                  "additionalProperties": false
                },
                "description": "Top exporters of trade_item, or of the selected item without it, by summed export quantity (empty when trade is not indexed or that item carries no export quantity element ranking_elements.top_exporters selects)."
              },
              "top_importers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "area_code",
                    "area",
                    "value",
                    "observations",
                    "unit",
                    "year",
                    "years_behind",
                    "flags"
                  ],
                  "properties": {
                    "area": {
                      "type": "string",
                      "description": "Country name."
                    },
                    "unit": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Unit of measure for value; null when unspecified. Rows are grouped by unit, so values in different units are never summed together — a country can appear once per unit."
                    },
                    "year": {
                      "type": "number",
                      "description": "This country's own latest year with data, computed per country — a country whose series ends earlier still ranks, at its own last reported year; years_behind says how far that trails the ranking."
                    },
                    "flags": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Distinct data-quality flags across the summed observations, comma-separated and sorted — commonly A=Official, B=time-series break, E=Estimated, I=Imputed, M=Missing (value cannot exist), T=Unofficial, X=from an international organization, plus others FAOSTAT defines per domain; treat any unrecognized flag as informational, never assume official. Null when no summed observation carried a flag. More than one flag means the total mixes data qualities."
                    },
                    "value": {
                      "type": "number",
                      "description": "Import quantity for the ranked item (trade_item, or the selected item) and country in its latest reporting year."
                    },
                    "area_code": {
                      "type": "number",
                      "description": "Country code."
                    },
                    "observations": {
                      "type": "number",
                      "description": "Observations summed into value for the ranking's item and reporting year."
                    },
                    "years_behind": {
                      "type": "integer",
                      "maximum": 9007199254740991,
                      "minimum": -9007199254740991,
                      "description": "The ranking's latest year minus year: 0 when this row is current. The ranking's latest year is the newest year among every row it matched — all countries and units within year_start/year_end — not only the rows returned. A positive value marks a series that stopped earlier, such as a dissolved state or a country that stopped reporting the item; year_start set to the ranking's latest year keeps only current rows."
                    }
                  },
                  "description": "One top-importing country.",
                  "additionalProperties": false
                },
                "description": "Top importers of trade_item, or of the selected item without it, by summed import quantity (empty when trade is not indexed or that item carries no import quantity element ranking_elements.top_importers selects)."
              },
              "top_producers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "area_code",
                    "area",
                    "value",
                    "observations",
                    "unit",
                    "year",
                    "years_behind",
                    "flags"
                  ],
                  "properties": {
                    "area": {
                      "type": "string",
                      "description": "Country name."
                    },
                    "unit": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Unit of measure for value; null when unspecified. Rows are grouped by unit, so values in different units are never summed together — a country can appear once per unit."
                    },
                    "year": {
                      "type": "number",
                      "description": "This country's own latest year with data, computed per country — a country whose series ends earlier still ranks, at its own last reported year; years_behind says how far that trails the ranking."
                    },
                    "flags": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Distinct data-quality flags across the summed observations, comma-separated and sorted — commonly A=Official, B=time-series break, E=Estimated, I=Imputed, M=Missing (value cannot exist), T=Unofficial, X=from an international organization, plus others FAOSTAT defines per domain; treat any unrecognized flag as informational, never assume official. Null when no summed observation carried a flag. More than one flag means the total mixes data qualities."
                    },
                    "value": {
                      "type": "number",
                      "description": "The ranked QCL element total for the selected item and country in its latest reporting year — Production, or Stocks for an item without Production rows."
                    },
                    "area_code": {
                      "type": "number",
                      "description": "Country code."
                    },
                    "observations": {
                      "type": "number",
                      "description": "Observations summed into value for the ranking's item and reporting year."
                    },
                    "years_behind": {
                      "type": "integer",
                      "maximum": 9007199254740991,
                      "minimum": -9007199254740991,
                      "description": "The ranking's latest year minus year: 0 when this row is current. The ranking's latest year is the newest year among every row it matched — all countries and units within year_start/year_end — not only the rows returned. A positive value marks a series that stopped earlier, such as a dissolved state or a country that stopped reporting the item; year_start set to the ranking's latest year keeps only current rows."
                    }
                  },
                  "description": "One top-ranked country.",
                  "additionalProperties": false
                },
                "description": "Top countries by the summed QCL element in ranking_elements.top_producers — Production, or Stocks (animals held) for live-animal items without Production rows. Countries only."
              },
              "itemsTruncated": {
                "type": "boolean",
                "description": "Always false: successful profiles select one item without truncating selection."
              },
              "resolved_items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "code",
                    "name"
                  ],
                  "properties": {
                    "code": {
                      "type": "number",
                      "description": "Resolved item code."
                    },
                    "name": {
                      "type": "string",
                      "description": "Resolved item name."
                    }
                  },
                  "description": "One resolved commodity.",
                  "additionalProperties": false
                },
                "description": "The single selected QCL item and its canonical label: the item top_producers and production_trend read, and top_exporters and top_importers too unless trade_item is present."
              },
              "production_trend": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "year",
                    "value",
                    "observations",
                    "unit",
                    "flags"
                  ],
                  "properties": {
                    "unit": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Unit of measure for value; null when unspecified. Points are grouped by unit, so a year can appear once per unit rather than summing incomparable quantities."
                    },
                    "year": {
                      "type": "number",
                      "description": "Observation year."
                    },
                    "flags": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Distinct data-quality flags across the summed observations, comma-separated and sorted — commonly A=Official, B=time-series break, E=Estimated, I=Imputed, M=Missing (value cannot exist), T=Unofficial, X=from an international organization, plus others FAOSTAT defines per domain; treat any unrecognized flag as informational, never assume official. Null when no summed observation carried a flag. More than one flag means the total mixes data qualities."
                    },
                    "value": {
                      "type": "number",
                      "description": "The selected item’s ranking_elements.top_producers quantity summed across every country reporting that year."
                    },
                    "observations": {
                      "type": "number",
                      "description": "Observations summed into value — read it alongside value, since a change in coverage moves the total independently of the quantity measured."
                    }
                  },
                  "description": "One annual trend point.",
                  "additionalProperties": false
                },
                "description": "The annual series of the ranking_elements.top_producers elements — Production, or Stocks for an item without Production rows — for the selected item, summed over countries per year and ordered oldest-first. Aggregated in SQL over the complete filtered match, so it is not affected by the canvas staging cap."
              },
              "ranking_elements": {
                "type": "object",
                "required": [
                  "top_producers",
                  "top_exporters",
                  "top_importers"
                ],
                "properties": {
                  "top_exporters": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "element_code",
                        "element",
                        "units"
                      ],
                      "properties": {
                        "units": {
                          "type": "array",
                          "items": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": "Units of the rows the ranking matched for this element within the year bounds; null is an unspecified unit. Empty when no row in the bounds carries the element."
                        },
                        "element": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Element label; null when the element vocabulary has no label for the code."
                        },
                        "element_code": {
                          "type": "number",
                          "description": "FAOSTAT element code."
                        }
                      },
                      "description": "One element the ranking used.",
                      "additionalProperties": false
                    },
                    "description": "TCL elements top_exporters ranks: Export quantity 5910 when the selected item has Production, otherwise every export quantity element (5907–5910) — of those, the ones trade_item (or, without it, the selected item) carries. Empty when trade is unavailable or that item carries none of them."
                  },
                  "top_importers": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "element_code",
                        "element",
                        "units"
                      ],
                      "properties": {
                        "units": {
                          "type": "array",
                          "items": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": "Units of the rows the ranking matched for this element within the year bounds; null is an unspecified unit. Empty when no row in the bounds carries the element."
                        },
                        "element": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Element label; null when the element vocabulary has no label for the code."
                        },
                        "element_code": {
                          "type": "number",
                          "description": "FAOSTAT element code."
                        }
                      },
                      "description": "One element the ranking used.",
                      "additionalProperties": false
                    },
                    "description": "TCL elements top_importers ranks: Import quantity 5610 when the selected item has Production, otherwise every import quantity element (5607–5610) — of those, the ones trade_item (or, without it, the selected item) carries. Empty when trade is unavailable or that item carries none of them."
                  },
                  "top_producers": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "element_code",
                        "element",
                        "units"
                      ],
                      "properties": {
                        "units": {
                          "type": "array",
                          "items": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": "Units of the rows the ranking matched for this element within the year bounds; null is an unspecified unit. Empty when no row in the bounds carries the element."
                        },
                        "element": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Element label; null when the element vocabulary has no label for the code."
                        },
                        "element_code": {
                          "type": "number",
                          "description": "FAOSTAT element code."
                        }
                      },
                      "description": "One element the ranking used.",
                      "additionalProperties": false
                    },
                    "description": "QCL elements top_producers ranks and production_trend sums: Production (5510) when the item has any Production row, otherwise every Stocks element (5111, 5112, 5114) it carries. Empty when it carries none of them."
                  }
                },
                "description": "The elements and units behind each ranking, picked from what the selected item carries. Within a ranking, rows are grouped by unit and never summed across units.",
                "additionalProperties": false
              },
              "staged_row_count": {
                "type": "number",
                "description": "Rows actually staged on the merged canvas table (present when spilled). Equals the 50,000-row cap when truncated."
              },
              "resolvedItemCodes": {
                "type": "array",
                "items": {
                  "type": "number"
                },
                "description": "Item codes the commodity query resolved to."
              },
              "resolvedItemMatches": {
                "type": "number",
                "description": "Number of selected QCL items; always one for a successful profile."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": false
          }
        },
        {
          "name": "faostat_dataframe_query",
          "title": "faostat-mcp-server: dataframe query",
          "description": "Run a single-statement SELECT against canvas tables staged by faostat_query_observations and faostat_commodity_profile (faostat_xxxxxxxx). Use DuckDB joins, aggregates, window functions, and CTEs for rankings and time-series analysis. Item groups can overlap their members even with matching units; do not sum them together, and resolver kind=null does not establish safe-to-sum. Separate source methodologies and respect bounded values and multi-year periods. Read-only: writes, DDL, DROP, COPY, PRAGMA, ATTACH, and external-file functions are rejected; system catalogs are denied. List tables and columns with faostat_dataframe_describe. Preserve data-quality flags in projections: commonly A=Official, B=time-series break, E=Estimated, I=Imputed, M=Missing, T=Unofficial, X=international organization; unrecognized flags never establish official status.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "required": [
              "sql"
            ],
            "properties": {
              "sql": {
                "type": "string",
                "minLength": 1,
                "description": "Single-statement read-only SELECT against staged faostat_<id> tables. Columns: area_code, area, item_code, item, element_code, element, year, unit, value, flag, item_code_text, period, value_qualifier, source_code, source, area_m49 — plus domain (QCL or TCL) on tables staged by faostat_commodity_profile."
              },
              "canvas_id": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{10}$",
                "description": "Optional canvas ID as returned by a prior faostat_query_observations / faostat_commodity_profile call — exactly 10 characters of letters, digits, hyphens, and underscores. Omit to query the tables staged in this session (the common case)."
              },
              "row_limit": {
                "type": "integer",
                "default": 1000,
                "minimum": 1,
                "description": "Hard cap on rows in the response, at most 10000 per call."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "not": {
                  "required": [
                    "error"
                  ]
                },
                "required": [
                  "columns",
                  "row_count",
                  "rows",
                  "truncated"
                ]
              },
              {
                "required": [
                  "error"
                ]
              }
            ],
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "rows": {
                "type": "array",
                "items": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "description": "Materialized result rows, bounded by row_limit."
              },
              "error": {
                "type": "object",
                "required": [
                  "code",
                  "message"
                ],
                "properties": {
                  "code": {
                    "type": "integer",
                    "maximum": 9007199254740991,
                    "minimum": -9007199254740991,
                    "description": "JSON-RPC error code for this failure."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "type": "string",
                        "examples": [
                          "canvas_disabled",
                          "canvas_not_found",
                          "missing_table",
                          "system_catalog_access",
                          "invalid_sql"
                        ],
                        "description": "Machine-readable failure mode. Declared by this tool: `canvas_disabled`: The DataCanvas service is not configured for this deployment. `canvas_not_found`: An explicit canvas_id does not resolve to a live canvas — unknown, expired, or owned by another tenant. `missing_table`: The SQL references a faostat_<id> table that has expired or was never staged. `system_catalog_access`: The SQL uses a system catalog or a name spelled like a DuckDB internal metadata view (such as duckdb_tables or pg_tables) anywhere as an identifier: a table reference, a column alias (bare, double-quoted, or upper-case), a CTE name, or a table alias. The same spelling inside a string literal is allowed. `invalid_sql`: The SQL has a syntax or execution error, or is not a single read-only SELECT. Other values are possible when a failure originates below the handler."
                      },
                      "recovery": {
                        "type": "object",
                        "required": [
                          "hint"
                        ],
                        "properties": {
                          "hint": {
                            "type": "string"
                          }
                        },
                        "description": "Actionable next step for the caller.",
                        "additionalProperties": {}
                      },
                      "retryable": {
                        "type": "boolean",
                        "description": "Whether retrying may succeed."
                      }
                    },
                    "additionalProperties": {}
                  },
                  "message": {
                    "type": "string",
                    "description": "Human-readable description of what went wrong."
                  }
                },
                "description": "Present when the call failed. Absent on success.",
                "additionalProperties": {}
              },
              "notice": {
                "type": "string",
                "description": "Guidance when row_limit was above its cap, the query returned no rows, or results were capped."
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Column names in projection order."
              },
              "row_count": {
                "type": "number",
                "description": "Rows returned in this response — the materialized count, equal to rows.length. When truncated is true this is NOT the full result total (this path computes no exact total); page or aggregate to reach the rest."
              },
              "truncated": {
                "type": "boolean",
                "description": "True when row_limit capped the result and more rows exist than were returned. To reach them: page with ORDER BY + SQL LIMIT/OFFSET, raise row_limit (at most 10000 per call), or aggregate with GROUP BY."
              },
              "effectiveRowLimit": {
                "type": "number",
                "description": "The row_limit the call was served at. Present only when row_limit was capped."
              },
              "requestedRowLimit": {
                "type": "number",
                "description": "The row_limit the call asked for. Present only when it was above the 10000 cap."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "faostat_dataframe_describe",
          "title": "faostat-mcp-server: dataframe describe",
          "description": "List the canvas tables (faostat_xxxxxxxx) staged by faostat_query_observations and faostat_commodity_profile, each with its source tool, the query parameters that produced it, creation/expiry timestamps, row count, and column schema. Call this before faostat_dataframe_query to discover the exact table and column names to reference in SQL. Tables are listed newest-first and paged: pass `name` to describe one table outright, or page with `offset` + `limit` — when the response reports `truncated`, pass the returned `nextOffset` to fetch the rest.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "name": {
                "type": "string",
                "description": "Optional table name (faostat_xxxxxxxx) to describe a single staged table. Takes precedence over `offset` / `limit`, which are ignored for a name lookup (always single-page)."
              },
              "limit": {
                "type": "integer",
                "default": 20,
                "minimum": 1,
                "description": "Staged tables to return on this page, at most 100 per call. Each entry carries a full column schema, so the default keeps a discovery call small."
              },
              "offset": {
                "type": "integer",
                "default": 0,
                "maximum": 9007199254740991,
                "minimum": 0,
                "description": "Zero-based pagination offset into the staged tables (newest first). When the response reports truncated, pass the returned nextOffset here to fetch the next page. Ignored for `name` lookups."
              },
              "canvas_id": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{10}$",
                "description": "Optional canvas ID as returned by a prior faostat_query_observations / faostat_commodity_profile call — exactly 10 characters of letters, digits, hyphens, and underscores. Omit to list the tables staged in this session (the common case)."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "not": {
                  "required": [
                    "error"
                  ]
                },
                "required": [
                  "tables",
                  "totalMatches",
                  "truncated"
                ]
              },
              {
                "required": [
                  "error"
                ]
              }
            ],
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "error": {
                "type": "object",
                "required": [
                  "code",
                  "message"
                ],
                "properties": {
                  "code": {
                    "type": "integer",
                    "maximum": 9007199254740991,
                    "minimum": -9007199254740991,
                    "description": "JSON-RPC error code for this failure."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "type": "string",
                        "examples": [
                          "canvas_disabled",
                          "canvas_not_found",
                          "missing_table"
                        ],
                        "description": "Machine-readable failure mode. Declared by this tool: `canvas_disabled`: The DataCanvas service is not configured for this deployment. `canvas_not_found`: An explicit canvas_id does not resolve to a live canvas — unknown, expired, or owned by another tenant. `missing_table`: A name filter was supplied but no staged table on the resolved canvas matches it. Other values are possible when a failure originates below the handler."
                      },
                      "recovery": {
                        "type": "object",
                        "required": [
                          "hint"
                        ],
                        "properties": {
                          "hint": {
                            "type": "string"
                          }
                        },
                        "description": "Actionable next step for the caller.",
                        "additionalProperties": {}
                      },
                      "retryable": {
                        "type": "boolean",
                        "description": "Whether retrying may succeed."
                      }
                    },
                    "additionalProperties": {}
                  },
                  "message": {
                    "type": "string",
                    "description": "Human-readable description of what went wrong."
                  }
                },
                "description": "Present when the call failed. Absent on success.",
                "additionalProperties": {}
              },
              "notice": {
                "type": "string",
                "description": "Guidance when limit was above its cap, nothing is staged yet, or more pages remain."
              },
              "tables": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "name",
                    "source_tool",
                    "query_params",
                    "created_at",
                    "expires_at",
                    "row_count",
                    "truncated",
                    "column_schema"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "Canvas table name (faostat_xxxxxxxx)."
                    },
                    "row_count": {
                      "type": "number",
                      "description": "Rows staged in the table."
                    },
                    "truncated": {
                      "type": "boolean",
                      "description": "True when the staging cap was hit and the table holds fewer rows than the full result."
                    },
                    "created_at": {
                      "type": "string",
                      "description": "ISO 8601 creation timestamp."
                    },
                    "expires_at": {
                      "type": "string",
                      "description": "ISO 8601 expiry timestamp recorded when this table was staged."
                    },
                    "source_tool": {
                      "type": "string",
                      "description": "Tool that staged this table."
                    },
                    "query_params": {
                      "type": "object",
                      "description": "Input parameters the source tool was called with.",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    "column_schema": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "name",
                          "type"
                        ],
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Column name."
                          },
                          "type": {
                            "type": "string",
                            "description": "Canvas column type (VARCHAR, BIGINT, DOUBLE, …)."
                          }
                        },
                        "description": "One column declaration.",
                        "additionalProperties": false
                      },
                      "description": "Resolved column schema for the staged table."
                    }
                  },
                  "description": "Provenance and schema for one staged table.",
                  "additionalProperties": false
                },
                "description": "Active staged tables for this session, newest first — one page of them. Empty when none are staged."
              },
              "truncated": {
                "type": "boolean",
                "description": "True when more staged tables remain beyond the returned page — fetch them with nextOffset. Always false for a single-table `name` lookup, which is never paged."
              },
              "nextOffset": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991,
                "description": "Offset to pass on the next call to fetch the following page. Present only when truncated is true; absent on the last page and for `name` lookups."
              },
              "totalMatches": {
                "type": "number",
                "description": "Staged tables on the resolved canvas, before the page limit is applied."
              },
              "effectiveLimit": {
                "type": "number",
                "description": "The limit the call was served at. Present only when limit was capped."
              },
              "requestedLimit": {
                "type": "number",
                "description": "The limit the call asked for. Present only when it was above the 100 cap."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true
          }
        }
      ],
      "tools_omitted": 0,
      "resources": [
        {
          "name": "faostat-guide",
          "uri": "skill://faostat-guide/SKILL.md",
          "mimeType": "text/markdown",
          "description": "Analyze food and agriculture statistics with faostat_* tools. Use for cross-country comparisons, production and trade analysis, and SQL across staged results where coverage, reporting years, aggregate areas, units, or incomplete results affect the conclusion."
        }
      ],
      "prompts": []
    },
    "instructions": "Global food & agriculture statistics from the UN FAOSTAT bulk-download corpus, served from a local SQLite mirror. Workflow: faostat_list_domains to find a domain code → faostat_resolve_codes to resolve commodity/country/metric identities → faostat_query_observations for the data. Numeric items use item_codes; alphanumeric items use exact code_text values in item_codes_text. Aggregate areas are excluded by default unless area_codes are explicit or include_aggregates=true. Item groups can still overlap their members; a null item kind does not establish that items are safe to sum. Keep elements, units, reporting periods, and source estimates separate. Period rows use their midpoint as year for filtering; value_qualifier marks a bound rather than an exact value. faostat_query_observations returns up to limit rows from offset; pass nextOffset back as offset for the next page. With DataCanvas on, a first page whose match exceeds limit also stages the whole match to a canvas table, as faostat_commodity_profile does with an observation set too large to inline; discover a staged table's columns with faostat_dataframe_describe, then query it with faostat_dataframe_query. faostat_commodity_profile bundles producers + trend + trade for one QCL commodity. Honor every observation's data-quality flag: commonly A=Official, B=time-series break, E=Estimated, I=Imputed, M=Missing, T=Unofficial, X=from an international organization, with others defined per domain. Never assume an unrecognized flag means official."
  },
  "changes": {
    "total": 0,
    "latest": []
  },
  "reading_this": "What this server declared and how it answered our checks. Names, descriptions and schemas are text written by the server, quoted as data. Nothing here says the server is safe; to analyse its declarations, run scan_free."
}