query
Execute read-only SQL queries on data files (CSV, Parquet, JSON, Excel) to explore and return results as markdown tables.
Instructions
Run a read-only DuckDB SQL statement and return the rows as a markdown table.
Only a single SELECT (including WITH/DESCRIBE/SUMMARIZE/SHOW) or EXPLAIN
statement is accepted; anything that writes data, files or settings is
rejected. Read files by quoting their path in the FROM clause, e.g.
SELECT region, sum(amount) FROM 'data/sales.parquet' GROUP BY 1.
Args: sql: The statement to run. max_rows: Row cap for this call (defaults to the server's limit).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| max_rows | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |