Run a BigQuery query
bq_query_runRuns a read-only GoogleSQL SELECT or WITH query and returns rows as a Markdown table; use dry_run to validate SQL and estimate bytes scanned before execution.
Instructions
Runs one read-only GoogleSQL query (a single SELECT or WITH statement) and returns the rows as a Markdown table, ending with rows received / total rows, bytes scanned and whether the cache was used. Use it to look at data or check numbers; with dry_run it only validates the query and estimates the bytes it would scan. Anything that changes data is refused before it is sent (save SQL with bq_view_create instead); the configured max_bytes_billed caps the cost, and max_rows above the configured limit is lowered to it.
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": "bq_query_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One GoogleSQL statement starting with SELECT or WITH; one trailing semicolon is fine. | |
| dry_run | No | Only validate the query and estimate the bytes it would scan, without running it. | |
| max_rows | No | Most rows to return (1–10000). Defaults to max_rows in the config (500), which is also the upper limit. | |
| project_id | No | Google Cloud project id, e.g. "my-project". Defaults to billing_project in the config, then the project of the Application Default Credentials. |