Skip to content
hs-sql-agent

Safe DML

Preview, approve, revalidate, then commit.

UPDATE and DELETE follow a multi-stage approval protocol that binds human approval to the validated plan and rechecks the affected row set inside the commit transaction.

01

Preview

Inspect the affected rows before the mutation is allowed to execute.

02

Approve

Bind a one-time human approval challenge to the validated operation.

03

Revalidate

Check the row set again inside the transaction before commit.

Approval is a protocol, not a dialog

A confirmation button is not enough when a generated mutation can affect production data. hs-sql-agent separates impact preview, explicit approval, transaction-time revalidation, and commit into distinct stages.

Bind approval to what was reviewed

The approval flow is designed around the validated operation and its observed impact. Before commit, the server checks that the plan, policy, challenge, row count, and row set still match the approved context.

  • read-only impact preview
  • one-time approval challenge
  • MCP form elicitation for the human decision
  • transaction-time row-set revalidation

Custom DML tools use the same boundary

Published custom tools that perform DML enter the same typed approval flow rather than bypassing the safety path. The tool abstraction changes how an operation is exposed, not the mutation safety contract.