query
Run read-only SQL SELECT statements to retrieve database data in a compact column/row format. Supports pagination with skip/take and returns total matching rows.
Instructions
Execute a read-only SELECT SQL query. Returns results in a compact column/row format to reduce token usage. Results are capped at 100 rows; use skip/take for pagination. The meta.totalCount field shows the total number of matching rows.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | SELECT SQL statement to execute | |
| skip | No | Number of rows to skip (offset) | |
| take | No | Maximum rows to return (max 100) | |
| database | No | Database to query; omit to use the default database |