query
Execute read-only SQL statements on local CSV, Parquet, JSON files or DuckDB, returning results as JSON rows, Markdown tables, and execution time with enforced row limits.
Instructions
Run one read-only SQL statement (SELECT / WITH / DESCRIBE / SHOW / SUMMARIZE / EXPLAIN). Returns columns, JSON rows, a Markdown table, a truncated flag and the elapsed time. The row limit is min(limit, server max rows).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| limit | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The statement as executed (after guard rewriting). | |
| rows | Yes | Row values, JSON-safe (dates as ISO strings). | |
| notes | No | ||
| columns | Yes | ||
| markdown | Yes | The same rows rendered as a Markdown table. | |
| row_count | Yes | Number of rows returned (after truncation). | |
| row_limit | Yes | Row cap that was applied, if any. | |
| truncated | Yes | True if more rows existed than were returned. | |
| elapsed_ms | Yes |