Run a read-only query
run_queryRun a single parameterized SELECT in a read-only PostgreSQL transaction with timeouts and row caps; unsafe writes, DDL, and side-effecting functions are refused.
Instructions
Runs one SELECT (WITH, VALUES, UNION allowed) in a read-only transaction with a time limit and returns at most 200 rows. Writes, DDL, locking clauses, system catalogs and side-effecting functions are refused with an explanation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | A single SELECT statement; use $1, $2 … for values | |
| limit | No | Maximum rows to return (≤ 200) | |
| params | No | Values for $1, $2 … |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| columns | Yes | ||
| rowCount | Yes | ||
| truncated | Yes | ||
| durationMs | Yes | ||
| redactedColumns | Yes |