You're viewing a demo portfolio

Join the waitlist
PRSM

faostat_dataframe_query

Active

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

declared in 0.1.5

Run a single-statement SELECT against the canvas tables staged by faostat_query_observations and faostat_commodity_profile (table names look like faostat_xxxxxxxx). Use this for cross-country and cross-item aggregation, GROUP BY rankings, joins, and time-series analysis over the full result set the inline preview only sampled. Standard DuckDB SQL — joins, aggregates, window functions, CTEs all work. Read-only: writes, DDL, DROP, COPY, PRAGMA, ATTACH, and external-file table functions are rejected; system catalogs (information_schema, sqlite_master, duckdb_*) are denied — list staged tables via faostat_dataframe_describe. Every row carries its data-quality `flag` (A=Official, E=Estimated, I=Imputed, …) — keep it in projections and honor it in interpretation.

Parameters schema

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/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. CAST(value AS DOUBLE) for arithmetic."
    },
    "canvas_id": {
      "type": "string",
      "description": "Optional canvas ID from a prior faostat_query_observations / faostat_commodity_profile call. Omit to query the tables staged in this session (the common case)."
    },
    "row_limit": {
      "type": "integer",
      "default": 1000,
      "maximum": 10000,
      "minimum": 1,
      "description": "Hard cap on rows in the response. Default 1000, max 10000."
    }
  }
}

What this tool wraps· 1 endpoint

min confidence0.700.50

Parent server

io.github.cyanheads/faostat-mcp-server

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

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