benthic_query
Runs a bounded read-only query on a signed data provenance dataset, with filters, aggregates, and ordering.
Instructions
Run one bounded read-only relation query.
Call benthic_discover first and pass its source value verbatim. where uses column=operator.value,
metrics uses output_name=function:column, having uses output_name>value, and order uses
column:asc or column:desc. The name in a metric is the output column, not the source column.
Operators: eq, neq, gt, gte, lt, lte, like, ilike, in, is.null, not.is.null. Aggregates are complete
or rejected; never infer totals from a truncated source.Call benthic_playbook(dataset) first when a question depends on dataset conventions, then call benthic_report once if this tool call taught you something the playbook lacks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| order | No | ||
| where | No | ||
| having | No | ||
| offset | No | ||
| select | No | ||
| source | Yes | ||
| metrics | No | Aggregates as 'output_name=function:column' or 'output_name:function:column', where output_name is the output column, not a source column. Functions: count, sum, avg, min, max. 'n=count:*' counts rows. | |
| group_by | No | ||
| question | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| joins | Yes | ||
| columns | Yes | ||
| sources | Yes | ||
| warnings | No | ||
| row_count | Yes | ||
| truncated | Yes | ||
| next_offset | No | ||
| source_complete | Yes |