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).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sql": "<sql>"
},
"name": "query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| max_rows | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |