Run query
run_queryExecute read-only SQL SELECT queries against Postgres to retrieve data as JSON, with results capped at 1000 rows and schema-qualified table names required.
Instructions
Run a read-only SQL SELECT against Postgres. Only SELECT is permitted — writes, DDL, and multi-statement queries are rejected. Results capped at 1000 rows and returned as JSON ({ columns, rowCount, rows }). Prefer GROUP BY / aggregation over raw dumps. Always qualify table names with schema, e.g. SELECT * FROM analytics.orders. Discover schemas/tables via list_schemas, list_tables, and describe_table first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | Read-only SELECT statement to execute |