Explain a query
explain_queryValidate a SQL query against policy without running it, showing the rewritten SQL, accessed tables and columns, or violations that would cause rejection.
Instructions
Check a query against the policy without running it. Returns ok, the SQL that would actually run (with the current user's row filters, masks and row limit added), the tables and columns it reads, or the violations that explain why it would be rejected.
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": "explain_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One SELECT query, in the dialect list_tables reports |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||