Query a dataset with SQL
query_datasetRead-only SQL over a dataset's own tables (one SELECT/WITH statement; every table name is a view
over that dataset's own files — nothing else on the server is reachable this way).
Args:
dataset_id: from a prior generate_dataset call.
sql: a single SELECT (or WITH ... SELECT) statement. No semicolons, file paths, or
statements that write or read outside the dataset (checked before running).
limit: rows returned, 1 to 5000 (1000 when not given).
Returns:
columns, rows, truncated (whether more rows existed than `limit`). A query that does not run says why, with
the dataset's `tables` and their columns to write it against.
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": {
"dataset_id": "<dataset_id>",
"sql": "<sql>"
},
"name": "query_dataset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| limit | No | ||
| dataset_id | Yes |