Skip to main content
Glama
x402-preflight-mcp

x402-preflight-mcp

by animus3d

sql_migration_lock_analyzer

Detect PostgreSQL/MySQL DDL migration lock hazards, flagging ACCESS EXCLUSIVE rewrites, non-CONCURRENTLY indexes, and unvalidated FKs to prevent downtime.

Instructions

[x402 $0.04 USDC on Base/Solana] Detects PostgreSQL/MySQL ACCESS EXCLUSIVE DDL table-rewrite and lock hazards (non-CONCURRENTLY indexes, unvalidated FKs, ALTER TYPE) with zero-downtime rewrites.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sql": "<sql>"
    },
    "name": "sql_migration_lock_analyzer"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesSQL DDL migration script
dialectNopostgres or mysql (default postgres)
pgVersionNoPostgreSQL major version (default 15)
_paymentSignatureNoOptional base64-encoded x402 v2 payment-signature header (overrides X402_PAYMENT_SIGNATURE env var).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the full behavioral burden. It usefully discloses the paid x402 cost ($0.04 USDC on Base/Solana) and the hazard categories checked, but never says whether the SQL is executed or only statically parsed, what the findings look like, or whether fixes/rewrites are returned versus only flagged — 'with zero-downtime rewrites' is ambiguous on that point.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single information-dense sentence, front-loaded with the hazard set that drives selection; nothing is redundant. The bracketed pricing prefix is marketplace metadata rather than tool semantics but is short and clearly demarcated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 4 fully documented parameters and no output schema, the definition should at least sketch the return shape (findings list, severity, rewrite suggestions) since none is available structurally. It covers inputs and hazard scope adequately but leaves the result model and depth of analysis unspecified for a paid analysis tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, covering sql, dialect, pgVersion, and the payment signature header, so the schema already does the parameter work. The description only indirectly corroborates dialect support by naming PostgreSQL/MySQL and adds no format, size, or version-range hints beyond that.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Detects) plus the exact resource (PostgreSQL/MySQL ACCESS EXCLUSIVE DDL table-rewrite and lock hazards), and enumerates concrete hazard classes (non-CONCURRENTLY indexes, unvalidated FKs, ALTER TYPE). An agent knows precisely what the tool analyzes without opening the schema, and the domain is distinct from every listed sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: the hazard list and the phrase 'with zero-downtime rewrites' signal this is a pre-deployment check of a DDL migration script. There is no explicit when-to-use/when-not guidance, no prerequisite (e.g., run before applying to production), and no routing to an alternative tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.