query
Execute read-only SQL against PostgreSQL with automatic policy validation, allowlist checks, and enforced row limits. Returns rows as JSON.
Instructions
Run a read-only SQL query against the database.
The query is validated against the security policy before execution: only allowlisted commands are accepted, denied keywords are rejected, and a LIMIT is appended automatically when the query has none.
Args: sql: SQL statement to execute (read-only).
Returns: Rows as a JSON array of objects, or an object with an "error" key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |