ava_query
Run read-only SQL against a loaded dataset's schema to compute comparisons, contributions and ratios, returning a queryId for artifact evidence.
Instructions
Execute read-only SQL in the source engine dialect from ava_schema (DuckDB, ClickHouse or PostgreSQL) and return queryId for artifact evidence. The latest 32 results and exact SQL are retained in this connection. Check truncation and scope. Closing the connection clears this cache; save needed evidence first. Semantic metadata does not rewrite SQL. Timed-out operations may still run; do not automatically retry or dispose an uncertain session. Apply confirmed definitions and compute comparisons and ratios in SQL. Reconcile category contributions with totals; leave zero-denominator growth undefined and identify new categories separately. SQL LIMIT or Top N can omit data even without a truncation flag. Distinguish observed changes and arithmetic contributors from causes; state evidence gaps before business advice. Give units, scope and material limitations with the answer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One read-only SELECT or CTE using tables and fields from ava_schema; at most 512 KiB | |
| maxRows | No | Returned row limit, default 200. Check truncated; prefer aggregation for complete results | |
| datasetId | Yes | ID returned by ava_source in this MCP connection |