run_query
Run a read-only SQL query and return the first rows, using inline SQL or a saved library query. Refuses non-SELECT/WITH statements for safe database access.
Instructions
Run a read-only query and return the first rows. Give either inline 'sql' or a library 'query' (id or name). params: {"@Start": "2026-01-01"}; library queries fall back to their header defaults. Anything but SELECT/WITH is refused before reaching the database. Rows are capped at the connection's max_rows (lower it with max_rows=); to look at big data, aggregate in SQL.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | No | ||
| query | No | ||
| params | No | ||
| max_rows | No | ||
| connection | No |