Check SQL with Claix Guard
claix.guard.checkClaix Guard: check a proposed SQL write before your app executes it (POST /check-sql). Body: { sql, params?: unknown[], connection_id?: uuid }. You define what is allowed. Returns allowed, needs_approval, verdict (allow | deny | needs_approval), reason, code, decision_id, violations. A write that does not fit an active permission is denied (code not_permitted). needs_approval means it fits and a person must confirm it; allowed is false. A denial is still HTTP 200 — read allowed. Claix never runs the statement.
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": "claix.guard.check"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The SQL statement the agent wants to run (INSERT, UPDATE, or DELETE). Claix only checks it; it does not execute it. | |
| params | No | Bound parameters for the SQL statement, in order ($1, $2, …). | |
| api_key | No | API key secreta de Claix. Ejemplo: claix_sk_abc123.... Opcional si la conexión MCP envía x-api-key en cabecera HTTP (recomendado en Smithery/Cursor). | |
| connection_id | No | Active Claix DB connection UUID. Required when the account has more than one active connection. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | JSON payload from the Claix API (extracted records, schema list, or Excel export metadata). | |
| error | No | Human-readable error message when success is false. | |
| success | Yes | True when Claix returned a successful response. False when isError is set on the tool result. |