You're viewing a demo portfolio

Join the waitlist
PRSM

openfda_dataframe_query

Active

Tool of @cyanheads/openfda-mcp-server

declared in 0.4.0

Run a read-only SQL SELECT against a DataCanvas table staged by an openFDA search tool (canvas_id + canvas_table in its response when spilled=true). Enables GROUP BY, COUNT/SUM/AVG, time-series, and joins across the full result set without re-paging the API. Call openfda_dataframe_describe first to get the exact table and column names. Scalar fields are stored as text (CAST for numeric math); nested objects/arrays are JSON columns — read them with DuckDB json functions, e.g. json_extract_string(openfda, '$.brand_name[0]'). Only SELECT is allowed — DDL, DML, COPY, and file-reading functions are blocked.

Parameters schema

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "required": [
    "canvas_id",
    "query"
  ],
  "properties": {
    "query": {
      "type": "string",
      "description": "SQL SELECT against the staged table. Use the table name from openfda_dataframe_describe. Example: \"SELECT classification, COUNT(*) AS n FROM spilled_ab12cd34 GROUP BY classification ORDER BY n DESC\"."
    },
    "canvas_id": {
      "type": "string",
      "description": "Canvas ID from an openFDA search tool response (the canvas_id field)."
    }
  }
}

What this tool wraps· 2 endpoints

min confidence0.700.50

Parent server

@cyanheads/openfda-mcp-server

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

2/7 registries
View full server →
openfda_dataframe_query — @cyanheads/openfda-mcp-server — PRSM MCP