Run a read-only query
run_queryExecute a single read-only GoogleSQL SELECT and return rows as a table; use dry_run to validate and estimate bytes scanned before running. Writes are refused.
Instructions
Run one SELECT in GoogleSQL and return the rows as a table. Writes are refused. Use dry_run to check a query and how many bytes it scans before running 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": "run_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | A single SELECT (or WITH … SELECT) in GoogleSQL | |
| dry_run | No | Only validate and estimate the bytes scanned | |
| max_rows | No | ||
| project_id | No | Google Cloud project id. Defaults to project_id in the config. |