Decide whether an agent-authored PostgreSQL statement complies with an execution
Decide whether an agent-authored PostgreSQL statement complies with an execution policy, using PostgreSQL's own parser rather than pattern matching. Detects statement stacking, data-modifying CTEs, COPY PROGRAM, privilege changes, and dangerous functions that read as ordinary SELECTs. Returns reason codes and an optional short-lived signed permit bound to the exact normalized statement. Never connects to your database.
Answeringour last check, 2026-09-24
1 of 1checks answered this week
1037 msmedian answer time
$0.01listed price per call
$0.01price it asked us
Paid test badge: not yet. The checks above are free: we call the tool without paying and read the payment request it sends back. The Verified badge needs paid calls whose answers match the promised output, and nobody can buy a badge.
Endpoint
POST https://sqlpermit.schemasure.com/v1/guard/sql
| Category | Code and developer |
|---|---|
| Provider host | sqlpermit.schemasure.com |
| Networks | eip155:8453 |
| Payment schemes | exact |
| Self-reported calls, 30 days | 40 from 6 payers (the provider's figure, not ours) |
Our checks, last 30 days
| Day | Result | HTTP | Asked | Time |
|---|---|---|---|---|
| 2026-09-24 | valid payment request | 402 | $0.01 | 1037 ms |
Example input (from the provider)
{
"body": {
"audience": "executor:acme-prod-01",
"dialect": "postgresql",
"issue_permit": true,
"policy": {
"allow_multi_statement": false,
"allowed_functions": [
"count",
"sum",
"avg"
],
"allowed_schemas": [
"analytics"
],
"allowed_tables": [
"analytics.orders"
],
"max_rows": 1000,
"read_only": true
},
"sql": "SELECT id, total FROM analytics.orders ORDER BY created_at DESC LIMIT 100",
"target_pg_major": 18
},
"bodyType": "json",
"method": "POST",
"type": "http"
}
Promised output schema (from the provider)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"additionalProperties": false,
"properties": {
"audience": {
"description": "Identity of the ONE executor the permit is for. Required when issue_permit is true. Wildcards are rejected.",
"type": "string"
},
"dialect": {
"enum": [
"postgresql"
],
"type": "string"
},
"issue_permit": {
"type": "boolean"
},
"policy": {
"additionalProperties": false,
"properties": {
"allow_multi_statement": {
"description": "Permit more than one statement in the input. Defaults to false.",
"type": "boolean"
},
"allow_returning": {
"description": "Accept RETURNING on a permitted write without a warning.",
"type": "boolean"
},
"allow_row_locks": {
"description": "Accept SELECT ... FOR UPDATE without a warning.",
"type": "boolean"
},
"allowed_functions": {
"description": "Added to the built-in allowlist. Bare name, or schema.function to admit one of your own.",
"items": {
"type": "string"
},
"type": "array"
},
"allowed_languages": {
"description": "Permitted CREATE FUNCTION languages. Defaults to none.",
"items": {
"type": "string"
},
"type": "array"
},
"allowed_schemas": {
"description": "Schemas the statement may reference.",
"items": {
"type": "string"
},
"type": "array"
},
"allowed_tables": {
"description": "Permitted relations as schema.table, or a bare name to match an unqualified reference.",
"items": {
"type": "string"
},
"type": "array"
},
"max_rows": {
"description": "Row ceiling. Becomes a permit obligation the executor enforces.",
"minimum": 1,
"type": "integer"
},
"read_only": {
"description": "Reject anything that can change data or schema, including writes reached through a CTE.",
"type": "boolean"
},
"statement_timeout_ms": {
"description": "Timeout written into the permit obligations. Defaults to 30000.",
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"sql": {
"maxLength": 100000,
"minLength": 1,
"type": "string"
},
"subject": {
"description": "Opaque caller label recorded as the permit subject.",
"type": "string"
},
"target_pg_major": {
"description": "Required. The PostgreSQL major the statement will run on. Only 18 is supported in v1: a permit issued under one grammar and verified against another is a parser differential.",
"enum": [
18
],
"type": "integer"
}
},
"required": [
"dialect",
"target_pg_major",
"sql"
],
"type": "object"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"properties": {
"confidence": {
"type": "number"
},
"data_versions": {
"type": "object"
},
"evidence": {
"items": {
"properties": {
"code": {
"description": "Stable reason code, e.g. DATA_MODIFYING_CTE.",
"type": "string"
},
"data": {
"type": "object"
},
"detail": {
"type": "string"
},
"disposition": {
"enum": [
"block",
"warn",
"info"
],
"type": "string"
},
"severity": {
"enum": [
"info",
"low",
"medium",
"high",
"critical"
],
"type": "string"
},
"source": {
"type": "string"
},
"span": {
"properties": {
"end": {
"type": "integer"
},
"start": {
"type": "integer"
}