Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

query

Request example
{ "method": "tools/call", "params": { "name": "query", "arguments": { "sql": "string", "project": "string", "org": "string", "json": true } } }
queryTOOL
Run a ClickHouse SQL query against a project's database.
Without a FORMAT clause, renders an auto-sized terminal table. Add --json to get the raw JSON envelope { data, meta, rows, statistics } instead.
Append a ClickHouse FORMAT clause to the SQL for raw output: JSON, JSONEachRow, CSV, CSVWithNames, TSV, TSVWithNames, PrettyCompact, Parquet, Prometheus. The response body is written directly to stdout so you can pipe it.
ProjectId filtering is automatic via JWT. Never add WHERE ProjectId in SQL.
Parameters
sql *string
Positional argument sql
project?string
Project slug override (defaults to folder setup)
org?string
Organization override (defaults to folder setup)
json?boolean
Print the raw JSON envelope instead of a table (only applies when no FORMAT clause is in the SQL)