{"uid":"cap_5lQMZqKsMXrIxuX11srmc","slug":"agent402-sql-certificate-verifier-92ed7814","name":"Agent402 SQL Certificate Verifier","description":"Verify an Ed25519 execution certificate against the exact SQL statement you are about to run - the gate your database layer calls before it obeys an agent. Checks the signature, the certificate version, the expiry, and that the statement's SHA-256 matches the one certified, so a certificate for a different (or edited) statement is rejected. Returns { valid, reason, payload } and never throws on a malformed token, so the executor always gets one uniform answer.","url":"https://agent402.tools/api/sql-cert-verify","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"sql":{"type":"string","description":"the exact statement the certificate should cover"},"publicKey":{"type":"string","description":"PEM public key of the issuer (default: this deployment's)"},"certificate":{"type":"string","description":"the token from sql-guard (payload.signature)"}}},"responseSchema":{"type":"json","example":{"valid":true,"reason":null,"payload":{"v":1,"exp":4070908800,"sha256":"635cf20a…","verdict":"pass"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_z-wkpjRFzuyvK3adfnPJK","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Verifies a cryptographic SQL certificate (issued by sql-guard) to confirm it covers a specific SQL statement and was issued by a trusted key","exampleAgentPrompt":"Can you verify this sql-guard certificate token 'eyJhbGci...' to confirm it actually covers the SQL statement 'SELECT * FROM orders WHERE user_id = 42'?","exampleUseCases":[{"title":"Pre-execution SQL integrity check","prompt":"Before my agent runs this SQL query against the database, verify that the sql-guard certificate 'eyJv1...' actually covers the statement 'SELECT balance FROM accounts WHERE id = 101' and hasn't been tampered with."},{"title":"Auditing certified queries in a pipeline","prompt":"I have a pipeline that receives SQL statements with attached certificates. Can you verify that this certificate payload 'sig_abc123' is valid for the statement 'INSERT INTO logs VALUES (?, ?, ?)' and was signed by this PEM public key?"},{"title":"Preventing SQL injection via certificate validation","prompt":"My app only wants to run SQL that has a valid sql-guard certificate. Check whether this certificate token 'payload.sig_xyz' legitimately covers the query 'DELETE FROM sessions WHERE expired = true' before I allow it to execute."}],"resultDescription":"Returns a JSON object with a 'valid' boolean indicating whether the certificate is authentic and covers the provided SQL statement, a 'reason' field (null on success or an error message on failure), and a 'payload' object containing the certificate version, expiry timestamp, SHA-256 hash of the SQL, and the original verdict (e.g. 'pass').","failureModes":["Certificate does not match the provided SQL statement — valid: false with reason explaining the mismatch","Expired certificate — payload.exp is in the past, valid: false","Invalid PEM public key format — error parsing the provided publicKey","Malformed or tampered certificate token — signature verification fails, valid: false","Missing required field (sql or certificate) — request rejected with validation error"],"whenToPreferThis":"Use this endpoint when you need to cryptographically verify that a SQL statement has been pre-approved and certified by a sql-guard certificate before executing it — especially in agentic pipelines where untrusted SQL needs to be authenticated. Prefer this over manual hash-checking when the certificate was issued by sql-guard and you need to confirm both integrity and issuer trust. Ideal for zero-trust database access patterns where the wallet is the identity and no API key is needed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:18:15.677Z","isFirstParty":false}