SQLPermit
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.
The wallet the 402 directs payment to. Its whole payment record — every payer, every chain — is on the merchant page.
Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
The payTo wallet does not resolve to a registered ERC-8004 agent. That is not a verdict on the service — most of the catalog is unregistered.
Accepts
The payment requirements as published to the catalog. Read the live 402 before paying — a price here is a claim, not a quote.
Pay 0.01 USDC on Base to 0x9876…12690. The signed payment is good for 1 minute.
- Paid to
- 0x9876…12690
- USD Coin contract
- 0x8335…02913
- Payment window
- 1 minute
- As published
- 10000 smallest units
The catalog’s raw entry
[
{
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"extra": {
"name": "USD Coin",
"version": "2"
},
"payTo": "0x9876af0F6D8Ed5155Cd02d1ca56D128601612690",
"amount": "10000",
"scheme": "exact",
"network": "eip155:8453",
"maxTimeoutSeconds": 60
}
]Extensions
{
"bazaar": {
"info": {
"input": {
"body": {
"sql": "SELECT id, total FROM analytics.orders ORDER BY created_at DESC LIMIT 100",
"policy": {
"max_rows": 1000,
"read_only": true,
"allowed_tables": [
"analytics.orders"
],
"allowed_schemas": [
"analytics"
],
"allowed_functions": [
"count",
"sum",
"avg"
],
"allow_multi_statement": false
},
"dialect": "postgresql",
"audience": "executor:acme-prod-01",
"issue_permit": true,
"target_pg_major": 18
},
"type": "http",
"method": "POST",
"bodyType": "json"
},
"output": {
"type": "json",
"example": {
"ok": true,
"result": {
"permit": "eyJhbGciOiJFZDI1NTE5Iiwia2lkIjoi…",
"grammar": "pg18/libpg-query@18.1.4",
"findings": [],
"stmt_hash": "sha256:0f4c1d8e2b7a9c5d3e6f8a1b2c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d",
"permit_kid": "uGzLTTwi4LTsOiBLgwf2wMU7ILTecj18Y_71Y37bVD8",
"obligations": {
"max_rows": 1000,
"require_read_only_tx": true,
"statement_timeout_ms": 30000
},
"policy_hash": "sha256:2b7a9c5d3e6f8a1b2c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d0f4c1d8e",
"classification": "read_only",
"normalized_sql": "SELECT id, total FROM analytics.orders ORDER BY created_at DESC LIMIT 100",
"statement_count": 1,
"statement_types": [
"SelectStmt"
],
"target_pg_major": 18,
"stmt_fingerprint": "a1b2c3d4e5f60718",
"permit_expires_at": "2026-08-03T12:00:45.000Z",
"referenced_tables": [
"analytics.orders"
],
"referenced_schemas": [
"analytics"
],
"referenced_functions": []
},
"verdict": "pass",
"evidence": [],
"warnings": [
"stmt_fingerprint is ADVISORY and must not be used for authorization: libpg-query fingerprints discard literal constants, so two statements differing only in a value share one fingerprint. stmt_hash is the binding value."
],
"confidence": 1,
"risk_codes": [],
"request_hash": "sha256:1c2d0f4c1d8e2b7a9c5d3e6f8a1b2c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b",
"data_versions": {
"parser": "libpg-query@18.1.4",
"grammar": "pg18/libpg-query@18.1.4",
"pg_parse_version": "180004"
},
"policy_version": "sqlpermit-policy-1.0.0"
}
}
},
"schema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"input"
],
"properties": {
"input": {
"type": "object",
"required": [
"type",
"method",
"bodyType",
"body"
],
"properties": {
"body": {
"type": "object",
"required": [
"dialect",
"target_pg_major",
"sql"
],
"properties": {
"sql": {
"type": "string",
"maxLength": 100000,
"minLength": 1
},
"policy": {
"type": "object",
"properties": {
"max_rows": {
"type": "integer",
"minimum": 1,
"description": "Row ceiling. Becomes a permit obligation the executor enforces."
},
"read_only": {
"type": "boolean",
"description": "Reject anything that can change data or schema, including writes reached through a CTE."
},
"allowed_tables": {
"type": "array",
"items": {
"type": "string"
},
"description": "Permitted relations as schema.table, or a bare name to match an unqualified reference."
},
"allow_returning": {
"type": "boolean",
"description": "Accept RETURNING on a permitted write without a warning."
},
"allow_row_locks": {
"type": "boolean",
"description": "Accept SELECT ... FOR UPDATE without a warning."
},
"allowed_schemas": {
"type": "array",
"items": {
"type": "string"
},
"description": "Schemas the statement may reference."
},
"allowed_functions": {
"type": "array",
"items": {
"type": "string"
},
"description": "Added to the built-in allowlist. Bare name, or schema.function to admit one of your own."
},
"allowed_languages": {
"type": "array",
"items": {
"type": "string"
},
"description": "Permitted CREATE FUNCTION languages. Defaults to none."
},
"statement_timeout_ms": {
"type": "integer",
"minimum": 1,
"description": "Timeout written into the permit obligations. Defaults to 30000."
},
"allow_multi_statement": {
"type": "boolean",
"description": "Permit more than one statement in the input. Defaults to false."
}
},
"additionalProperties": false
},
"dialect": {
"enum": [
"postgresql"
],
"type": "string"
},
"subject": {
"type": "string",
"description": "Opaque caller label recorded as the permit subject."
},
"audience": {
"type": "string",
"description": "Identity of the ONE executor the permit is for. Required when issue_permit is true. Wildcards are rejected."
},
"issue_permit": {
"type": "boolean"
},
"target_pg_major": {
"enum": [
18
],
"type": "integer",
"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."
}
},
"additionalProperties": false
},
"type": {
"type": "string",
"const": "http"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
}
},
"additionalProperties": false
},
"output": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string"
},
"example": {
"type": "object",
"required": [
"ok",
"verdict",
"confidence",
"risk_codes",
"evidence",
"result",
"policy_version",
"request_hash",
"data_versions",
"warnings"
],
"properties": {
"ok": {
"type": "boolean"
},
"result": {
"type": "object",
"required": [
"statement_count",
"statement_types",
"referenced_schemas",
"referenced_tables",
"referenced_functions",
"classification",
"findings",
"normalized_sql",
"stmt_hash",
"stmt_fingerprint",
"policy_hash",
"grammar",
"target_pg_major",
"obligations"
],
"properties": {
"permit": {
"type": "string",
"description": "Compact JWS. Present only when requested and the verdict is not block."
},
"grammar": {
"type": "string"
},
"findings": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"severity",
"detail",
"disposition"
],
"properties": {
"code": {
"type": "string",
"description": "Stable reason code, e.g. DATA_MODIFYING_CTE."
},
"data": {
"type": "object"
},
"span": {
"type": "object",
"properties": {
"end": {
"type": "integer"
},
"start": {
"type": "integer"
}
}
},
"detail": {
"type": "string"
},
"source": {
"type": "string"
},
"severity": {
"enum": [
"info",
"low",
"medium",
"high",
"critical"
],
"type": "string"
},
"disposition": {
"enum": [
"block",
"warn",
"info"
],
"type": "string"
}
}
}
},
"stmt_hash": {
"type": "string",
"description": "BINDING. sha256 of normalized_sql. The executor recomputes this from the statement it is about to run."
},
"permit_kid": {
"type": "string"
},
"obligations": {
"type": "object",
"required": [
"max_rows",
"statement_timeout_ms",
"require_read_only_tx"
],
"properties": {
"max_rows": {
"type": [
"integer",
"null"
]
},
"require_read_only_tx": {
"type": "boolean"
},
"statement_timeout_ms": {
"type": "integer"
}
}
},
"policy_hash": {
"type": "string"
},
"classification": {
"enum": [
"read_only",
"write",
"ddl",
"mixed"
],
"type": "string"
},
"normalized_sql": {
"type": "string",
"description": "Deparsed canonical statement. This, not your original text, is what a permit binds."
},
"statement_count": {
"type": "integer"
},
"statement_types": {
"type": "array",
"items": {
"type": "string"
}
},
"target_pg_major": {
"type": "integer"
},
"stmt_fingerprint": {
"type": "string",
"description": "ADVISORY ONLY — never authorize on this. libpg-query fingerprints discard literal constants, so 'WHERE id = 1' and 'WHERE id = 999999' share one fingerprint."
},
"permit_expires_at": {
"type": "string"
},
"referenced_tables": {
"type": "array",
"items": {
"type": "string"
}
},
"referenced_schemas": {
"type": "array",
"items": {
"type": "string"
}
},
"referenced_functions": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"verdict": {
"enum": [
"pass",
"warn",
"block"
],
"type": "string"
},
"evidence": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"severity",
"detail",
"disposition"
],
"properties": {
"code": {
"type": "string",
"description": "Stable reason code, e.g. DATA_MODIFYING_CTE."
},
"data": {
"type": "object"
},
"span": {
"type": "object",
"properties": {
"end": {
"type": "integer"
},
"start": {
"type": "integer"
}
}
},
"detail": {
"type": "string"
},
"source": {
"type": "string"
},
"severity": {
"enum": [
"info",
"low",
"medium",
"high",
"critical"
],
"type": "string"
},
"disposition": {
"enum": [
"block",
"warn",
"info"
],
"type": "string"
}
}
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"confidence": {
"type": "number"
},
"risk_codes": {
"type": "array",
"items": {
"type": "string"
}
},
"request_hash": {
"type": "string"
},
"data_versions": {
"type": "object"
},
"policy_version": {
"type": "string"
}
}
}
}
}
}
}
}
}Provenance
- Seen in the source catalog
- 2026-09-24 07:39Z
- Last indexed by Roundhouse
- 2026-09-24 13:30Z
- Last enriched (probe, favicon, geo)
- 2026-09-20 12:45Z
- x402 version
- 2
- Max timeout
- 60s
- Liveness probe
- HTTP 404
Hand this page to an agent
Copy the prompt and paste it into Claude, an MCP client or your own agent — it will vet this service and call it over the free read API. No key, no account.
GET api.roundhouseai.io/v0/endpoints
This endpoint's own trailing-30-day call count, as published by the upstream catalog and snapshotted daily. 30 snapshots so far. Verified volume counts only settlements with an on-chain EIP-3009 marker.
Show the promptHide the prompt
Using Roundhouse, look up the x402 service SQLPermit and tell me whether it is worth paying: what a call costs, whether the endpoint answered when last probed, and what its payment record actually shows. curl -s 'https://api.roundhouseai.io/v0/endpoints?q=SQLPermit' curl -s 'https://api.roundhouseai.io/v0/merchants/<the payTo wallet returned above>' Then call it: read the price from the live 402 at https://sqlpermit.schemasure.com/v1/guard/sql, never from a cached figure, and pay with an x402 client. The /v0 API needs an API key (`authorization: Bearer rh_live_…`) on everything except /v0/unified* and /v0/endpoints. Mint a personal key for $0.01 at GET https://api.roundhouseai.io/v0/test/x402, or use an organization key from https://roundhouseai.io/dashboard/team. If you do not have Roundhouse tools or skills installed, read https://roundhouseai.io/skill.md first — it is the whole procedure.