Validate SELECT Query
validate_select_queryValidate SQL as read-only and safe to execute, returning normalized SQL with auto LIMIT preview to inspect results before running on large tables.
Instructions
Validates SQL is read-only and safe to execute without running it. Returns normalized SQL with auto LIMIT preview for SELECT statements. Use before execute_select_query on large or unfamiliar tables.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "validate_select_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | No | Read-only SQL starting with SELECT, SHOW, DESCRIBE, or EXPLAIN. Alias: query. | |
| limit | No | Max rows to return for SELECT queries. Defaults to 100. Hard cap: 1000. | |
| query | No | Alias for sql — same parameter, alternative name. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | Yes | ||
| reason | No | ||
| normalizedSql | No |