Run a read-only SQL query
run_queryExecutes a single read-only SELECT or WITH statement against a connected database and returns the result rows as JSON, CSV, or Markdown.
Instructions
Runs a single read-only SELECT or WITH statement and returns the rows as JSON. Writes are rejected and results are capped.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | A single read-only SELECT or WITH statement, written in the connected database's SQL dialect | |
| format | No | Output format for the rows: json (default), csv, or markdown |