paleobiology-mcp-server: query staged occurrences with SQL
paleobiology_dataframe_queryRun a read-only SQL SELECT against occurrence result sets staged on a DataCanvas by paleobiology_search_occurrences. This is how you analyze a large fossil set without re-fetching it: count occurrences by early_interval, group by formation, country (cc), or accepted_name, or filter by a paleo/modern coordinate range. The classification column is JSON — roll up by rank with json_extract_string(classification, '$.family') (also $.phylum, $.class, $.order, $.genus). Staged rows are occurrences, so collection-only fields such as lithology are not present. Reference tables by the table_name that search_occurrences returned — call paleobiology_dataframe_describe first if you do not know the table or column names. SELECT only; writes and file-reading functions are rejected.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | A read-only SQL SELECT. Reference tables by the names paleobiology_search_occurrences / _describe returned. | |
| canvas_id | Yes | Canvas id returned by paleobiology_search_occurrences when its result spilled. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | No | Result rows (capped at the canvas row limit). Keys are the selected column names. | |
| error | No | Present when the call failed. Absent on success. | |
| row_count | No | Number of rows in the full result before any row cap. | |
| truncated | No | True when the result exceeded the canvas row cap and rows were trimmed. |