Run Sql
run_sqlExecute read-only SQL queries against a datasource to return columns, rows, row count, truncation status, terms, and warnings; writes and multiple statements are refused.
Instructions
Execute a read-only query and return columns, rows, row_count and truncated, plus the Terms it used and warnings. Writes, DDL and multiple statements are refused; the connection itself is read-only. Present the SQL with the answer and say when results are truncated.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One read-only SELECT in the datasource dialect. | |
| max_rows | No | Rows to return (capped by the server). | |
| question | No | The user's question, kept with the query for provenance. | |
| datasource | No | Datasource name. Optional when only one datasource is registered. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||