{"uid":"cap_btQJnFVxVVBEounGa2JrG","slug":"sqlscan-check-b6c01d6f","name":"sqlscan-check","description":"Safety and performance preflight for a database query BEFORE you run it. Send the query for Postgres, MySQL or SQLite and get a pass, caution or block verdict with per-finding operation, severity, plain-language reason and a fix. Query-safety indicators, not a guarantee.","url":"https://payai.agentstools.dev/sql/check","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"sql":{"type":"string","description":"The query text to check"},"dialect":{"enum":["postgres","mysql","sqlite","bigquery","snowflake"],"type":"string","description":"Database dialect (default postgres)"},"options":{"type":"object","description":"Optional hints, e.g. indexed_columns: list of column names to refine performance findings"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_6uTj8MiddKx0kyyVNMHSl","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Pre-flight safety and performance analysis of a SQL query returning a pass/caution/block verdict with per-finding severity, reason, and fix suggestion.","exampleAgentPrompt":"Before I run this query on our Postgres database, can you do a safety and performance check on it? The query is: DELETE FROM orders WHERE status = 'pending' — I want to know if it's safe or if there are any red flags.","exampleUseCases":[{"title":"Preventing dangerous DELETE in production","prompt":"Check this SQL before I run it on our MySQL production DB — DELETE FROM users WHERE last_login < '2020-01-01' — I want to know if it'll block, what severity the risk is, and how to fix it if there's a problem."},{"title":"Detecting missing index on large table query","prompt":"Can you scan this Postgres query for performance issues? SELECT * FROM events WHERE user_id = 42 AND created_at > NOW() - INTERVAL '30 days' — the indexed columns are user_id and event_type, tell me if there's a full table scan risk."},{"title":"Vetting AI-generated SQL before execution","prompt":"My app just auto-generated this SQLite query from user input — can you check it for SQL injection or anything dangerous before I actually run it? Query: SELECT * FROM products WHERE category = 'shoes' AND price < 100"}],"resultDescription":"A structured verdict (pass, caution, or block) for the submitted query, along with an array of findings each containing the SQL operation involved, a severity level, a plain-language explanation of the issue, and a recommended fix. Acts as a safety indicator rather than a guarantee of execution safety.","failureModes":["Unsupported dialect submitted — only postgres, mysql, sqlite, bigquery, snowflake are accepted","Malformed or unparseable SQL returns an error or inconclusive verdict","False negatives: complex nested queries may not catch all issues","Missing indexed_columns hint may produce less accurate performance findings","Empty or blank sql field returns a validation error"],"whenToPreferThis":"Use this endpoint when an AI agent or automated pipeline is about to execute a SQL query — especially user-supplied, AI-generated, or dynamically constructed queries — and you need a quick safety and performance gate before touching the database. Prefer this over generic linting tools when you need dialect-aware (Postgres/MySQL/SQLite/BigQuery/Snowflake) analysis with actionable per-finding fixes. Ideal for agent workflows that construct SQL from natural language and need a guardrail layer before execution.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T07:06:00.881Z","isFirstParty":false}