Read Query
readQueryExecute read-only SQL queries like SELECT and EXPLAIN to retrieve, aggregate, or check data from database tables. Results are paginated for large datasets.
Instructions
Execute a read-only SQL query. Allowed statements: SELECT, EXPLAIN.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | Opaque pagination cursor. Omit (or pass `null`) for the first page. On subsequent calls, pass the `nextCursor` returned by the previous response verbatim. Cursors are opaque — do not parse, modify, or persist. Ignored for `EXPLAIN` statements. | |
| query | Yes | The SQL query to execute. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nextCursor | No | Opaque cursor pointing to the next page. Absent when this is the final page, when the result fits in one page, or when the statement is a non-`SELECT` kind that does not paginate (e.g. `SHOW`, `EXPLAIN`). | |
| rows | Yes | Result rows, each a JSON object keyed by a column name. |