{"uid":"cap_-WeKth-KfFeFbjQ-0smU-","slug":"agentstools-migration-safety-check-a49fe93f","name":"AgentsTools Migration Safety Check","description":"Safety preflight for a database schema migration BEFORE you apply it. Send the migration SQL for Postgres or MySQL and get a pass, caution or block verdict with per-finding operation, severity, plain-language reason and a zero-downtime alternative. Migration-safety indicators, not a guarantee.","url":"https://api.agentstools.dev/migrate/check","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"sql":{"type":"string","description":"The migration SQL / DDL text to check"},"format":{"enum":["sql","alembic","auto"],"type":"string","description":"Input format: raw SQL, an Alembic change file, or auto"},"dialect":{"enum":["postgres","mysql"],"type":"string","description":"Database dialect (default postgres)"},"options":{"type":"object","description":"Optional hints: rolling_deploy, pg_version, in_transaction"}}},"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_FZoXb3-ogwIWuE36W8yuu","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":"Analyzes database migration SQL for Postgres or MySQL and returns a pass/caution/block verdict with per-finding severity, plain-language reasons, and zero-downtime alternatives.","exampleAgentPrompt":"Before I apply this migration, can you do a safety preflight check on this Postgres SQL — `ALTER TABLE orders ADD COLUMN status VARCHAR(255) NOT NULL DEFAULT 'pending';` — and tell me if it'll cause downtime, what the risk level is, and if there's a safer zero-downtime way to do it?","exampleUseCases":[{"title":"Pre-deploy migration safety gate","prompt":"I'm about to deploy a Postgres migration that drops a column from our users table. Can you run a safety preflight check on this SQL — `ALTER TABLE users DROP COLUMN legacy_token;` — and tell me if it's safe or if I'll get table locks or downtime?"},{"title":"Alembic migration review in CI","prompt":"We have an Alembic migration file that adds a non-nullable column to a large MySQL table. Can you check it for safety issues, flag the severity of each finding, and suggest any zero-downtime alternatives before we merge the PR?"},{"title":"Rolling deploy compatibility check","prompt":"We're doing a rolling deploy and I need to make sure this migration SQL — `CREATE INDEX ON payments(user_id);` on Postgres — won't block reads or writes during the rollout. Can you check it with the rolling_deploy option enabled and tell me if it'll pass?"}],"resultDescription":"A structured safety report containing an overall verdict (pass, caution, or block), plus a list of per-finding details — each with the SQL operation involved, a severity level, a plain-language explanation of the risk, and a suggested zero-downtime alternative approach where applicable. This is an advisory signal, not a guaranteed outcome.","failureModes":["Invalid or unparseable SQL returns an error or low-confidence verdict","Unsupported dialect or format results in a rejection or fallback","Very long or complex migration scripts may exceed input limits","Dialect mismatch (e.g. MySQL syntax sent with postgres dialect) may produce incorrect analysis","Network or payment failure returns a non-200 response"],"whenToPreferThis":"Choose this endpoint when you need a fast, automated pre-flight safety check on a database migration SQL before applying it to production — especially for Postgres or MySQL. It is ideal for CI/CD pipeline gates, agent-driven deployment workflows, or anytime a human wants a quick risk verdict with actionable alternatives without manually reviewing DDL. Prefer this over manual review when speed and consistency matter, and over generic LLM SQL review when you need structured, machine-readable per-finding output with severity levels.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:56:52.954Z","isFirstParty":false}