run_select
Execute a read-only SELECT query against a database, with optional pagination and schema selection. Rejects writes and DDL for safe exploration.
Instructions
Run a single read-only SELECT (or WITH...SELECT / UNION) against a database.
connection is a named server from your config (defaults to the configured
default_connection). schema sets the default database/namespace for the query
(defaults to that connection's default_schema); table names can still be schema-
qualified to read across schemas on the same connection. Call list_connections()
if unsure what's available, list_schemas(connection) to see schemas on one.
Writes, DDL, multiple statements, INTO OUTFILE and dangerous functions are
rejected. Output is capped; when truncated is true, pass the suggested
offset to page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| offset | No | ||
| schema | No | ||
| max_rows | No | ||
| connection | No |