execute_query
Execute read-only SQL queries to search and retrieve Sankhya community posts. Supports SELECT, WITH (CTE), and EXPLAIN PLAN, plus pagination and bind parameters.
Instructions
Execute read-only SQL query (SELECT and EXPLAIN PLAN only). CTEs (WITH ... SELECT) accepted. Use list_schemas to see available connections and their readonly status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | SQL query to execute. SELECT, WITH (CTE), and EXPLAIN PLAN only. | |
| offset | No | Row offset for pagination. Default 0. | |
| params | No | Bind parameters as key-value pairs, e.g. {"id": 1}. | |
| max_rows | No | Maximum rows to return. Default 500. | |
| connection | No | Connection name from list_schemas. Defaults to the default connection. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |