Run read-only SQL
run_sqlRun one read-only DuckDB SELECT over the tables of list_tables (cex, polymarket, chainlink and the per-source views such as binance_btc or polymarket_btc_5m). Filter on ts and aggregate in SQL: at most max_rows rows come back (up to the server's cap), and the query is stopped at the timeout. DuckDB functions such as time_bucket, arg_max, quantile_cont, corr, regr_slope and window functions are available; file and network access are not.
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": "run_sql"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| max_rows | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |