Query Parquet with SQL
query_parquetRun one read-only DuckDB SELECT over a Parquet file, available as table data; join more files by passing tables ({name: artifact_id}, up to 7 besides data), e.g. a GL against a bank statement. Supports aggregates, window functions, CTEs, DESCRIBE data and SUMMARIZE data. Up to 1000 rows are returned; truncated says if more matched. Writes, file access and multiple statements are rejected. Example: SELECT region, sum(units) FROM data GROUP BY 1 ORDER BY 2 DESC. Price: $0.005 USDC per successful call, paid via x402.
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_parquet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One DuckDB SELECT statement over table `data`. | |
| url | No | Public http(s) URL of the input file. Preferred for anything over ~3 MB. | |
| limit | No | Maximum rows to return. | |
| format | No | json rows (default), a Markdown table, or CSV text. | json |
| tables | No | Extra tables for joins: {name: artifact_id}, up to 7 besides data. The main input is `data`. | |
| artifact_id | No | artifact_id returned by an earlier convert_to_parquet call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | No | Present when format=json. | |
| text | No | Present when format=markdown or csv. | |
| types | Yes | ||
| columns | Yes | ||
| row_count | Yes | ||
| truncated | Yes | True when more rows matched than were returned. | |
| total_rows | No |