LLM Safe SQL
Validates LLM-proposed database `UPDATE` and `DELETE` statements by executing them in a transaction, measuring actual changes, rolling back, and requiring human approval based on measured facts.
This tool addresses the critical safety gap in AI agents with database access, where a human often approves an LLM's *description* of its proposed SQL changes rather than the *actual* impact. LLM Safe SQL works by taking an LLM-generated `UPDATE` or `DELETE` statement, running it within a database transaction, meticulously measuring the real 'before' and 'after' states, and then always rolling back. It presents these measured changes as a "confirmation card" to a human for approval. Only after explicit human confirmation is the statement committed for real, ensuring that database modifications are based on verifiable facts rather than predictive guesses or potentially misleading summaries from the AI model. This robust human-in-the-loop mechanism provides strong guardrails against unintended or malicious database alterations for MySQL, PostgreSQL, and SQLite.