Skip to main content
Glama

paleobiology-mcp-server: query staged occurrences with SQL

paleobiology_dataframe_query
Read-onlyIdempotent

Run 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

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesA read-only SQL SELECT. Reference tables by the names paleobiology_search_occurrences / _describe returned.
canvas_idYesCanvas id returned by paleobiology_search_occurrences when its result spilled.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsNoResult rows (capped at the canvas row limit). Keys are the selected column names.
errorNoPresent when the call failed. Absent on success.
row_countNoNumber of rows in the full result before any row cap.
truncatedNoTrue when the result exceeded the canvas row cap and rows were trimmed.

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint and idempotentHint, but the description adds substantial behavioral context beyond that: staged rows are occurrences so collection-only fields like lithology are absent, classification is JSON and requires json_extract_string for rank rollups, and writes/file-reading functions are rejected. It also clarifies the relationship between search_occurrences and this staging step. This is rich disclosure beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized for a complex query tool and is front-loaded with the core purpose. Every sentence provides distinct value: use case, column hints, schema notes, prerequisites, and constraints. No filler or repetition of obvious information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with two parameters and an output schema, this description covers all decision-relevant context: what the staged data is, how to reference it, what can be analyzed, what fields are missing, how to handle JSON classification, and when to call describe first. An agent has everything needed to invoke this tool safely and correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and both parameters are already described in the input schema, including the read-only SQL constraint and the source of the canvas_id. The description restates those details but adds little new parameter-specific semantics beyond reinforcing that table names come from search_occurrences. Baseline 3 is appropriate because schema already covers the parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Run a read-only SQL SELECT against occurrence result sets staged on a DataCanvas by paleobiology_search_occurrences.' It clearly distinguishes itself from sibling search/describe tools by positioning itself as the analysis step after staging data. The purpose is unambiguous and agents can immediately tell it apart from the sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool: 'This is how you analyze a large fossil set without re-fetching it.' It also names the prerequisite alternative: 'call paleobiology_dataframe_describe first if you do not know the table or column names.' It sets clear boundaries with 'SELECT only; writes and file-reading functions are rejected,' which excludes misuse.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.7/5.0
Disambiguation5/5

Each tool targets a clearly distinct resource or workflow: taxa, intervals, occurrences, collections, diversity curves, and staged dataframe inspection. Even the two analysis-oriented tools (get_diversity and dataframe_query) are separated by whether the user needs a precomputed curve or arbitrary SQL over staged results.

Naming Consistency4/5

All tools share the paleobiology_ prefix and use clear snake_case names, so the set is predictable overall. The minor deviation is that dataframe_describe and dataframe_query place the object before the verb, while the other five tools use verb_object ordering (get_diversity, get_taxon, list_intervals, search_collections, search_occurrences).

Tool Count5/5

Seven tools is a well-scoped size for a Paleobiology Database client: two search tools, two lookup tools, two dataframe-analysis tools, and a diversity-curve tool. Each tool earns its place without redundancy or bloat.

Completeness5/5

The surface covers the full read-only workflow: resolve taxa, look up time intervals, search occurrences and collections, compute diversity curves, and run SQL analysis over large staged occurrence sets. No obvious gaps exist for the stated domain; pagination and staging hand-offs create no dead ends.