run_sql
Executes one read-only SELECT against the session warehouse, validates the SQL first, and returns capped rows with warnings, truncation status, and assumptions.
Instructions
Run ONE read-only SELECT against the session's warehouse.
`check_sql` runs first and an error means the SQL is NOT executed --
a query that sums cancelled orders runs perfectly well, so "it ran"
was never the standard. Warnings do not block, and come back with the
rows because they are about whether the number means what the user
thinks.
Rows are capped and there is a ten-minute time limit; the cap, the
limit and whether rows were truncated are all stated in the result,
so you can tell the user what actually applied. Nothing is written,
nothing is persisted, and your SQL is never rewritten: a required
filter is reported, never silently applied.
Refused while an inference is running -- one connection is not shared
between the two. Ask again when `status` says `ready`.
The result carries `assumptions` -- the unconfirmed claims the answer
rests on. Answer the user in words first, then render those under 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_sql"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One SELECT statement, in the dialect of the session's warehouse. It is run exactly as written. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |