run_query
Executes a single read-only SELECT query against a specified database and returns capped rows; rejects non-read-only statements and may truncate results.
Instructions
Run a single read-only SELECT against a database and get the rows back. The query is rejected if it is not one read-only statement, and results are capped and may be truncated. Call describe_schema first to get exact table and column names.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| database | Yes | ||
| max_rows | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| hint | No | ||
| rows | No | ||
| columns | No | ||
| message | No | ||
| row_count | No | ||
| truncated | No | ||
| elapsed_ms | No | ||
| error_type | No |