query
Run read-only SQL queries against PostgreSQL databases to retrieve data as formatted tables. Supports SELECT, WITH, EXPLAIN, and SHOW for safe analytical access.
Instructions
Execute a read-only SQL query on a database and return results as a formatted table.
Only SELECT, WITH, EXPLAIN, and SHOW queries are allowed.
Args: database: Name of the database from config. sql: SQL query to execute (read-only).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes | ||
| sql | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |