validate_query_without_execution
Generate and validate any SQL query (SELECT, INSERT, UPDATE, DELETE) without execution. Review table references, improvement hints, and execution readiness for safe manual verification.
Instructions
Generate and validate a SQL query without executing it.
This tool can generate ANY type of SQL query including both read and write operations
(SELECT, INSERT, UPDATE, DELETE, etc.) but does NOT execute them. Useful for generating
queries that users want to review and execute elsewhere after manual verification.
IMPORTANT: Write queries (INSERT, UPDATE, DELETE, etc.) can be generated here but
CANNOT be executed through the execute_query tool for safety reasons. Users must
execute write queries directly in Snowflake after manual review.
Parameters:
- sql: SQL query to generate (read or write operations allowed)
- database: Optional database context
- schema: Optional schema context
The tool will:
- Accept both read and write queries
- Check query type (SELECT, INSERT, UPDATE, DELETE, etc.)
- Extract table references
- Provide hints for improvement
- Return the formatted query ready for manual review
- Indicate whether the query can be executed via execute_query (read-only) or not (write)
Examples:
- validate_query_without_execution("SELECT * FROM customers")
- validate_query_without_execution("INSERT INTO orders (id, amount) VALUES (1, 100.00)")
- validate_query_without_execution("UPDATE customers SET status = 'active' WHERE id = 123")
- validate_query_without_execution("DELETE FROM temp_data WHERE created < '2024-01-01'")Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| database | No | ||
| schema | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||