Skip to main content
Glama

db_validate_migration

Analyze DDL migrations for zero-downtime safety by detecting locking risks, dangerous NOT NULL columns, and destructive table or column drops before deployment.

Instructions

Analyze DDL migrations against zero-downtime safety rules, detect table-level locking risks (e.g. non-concurrent index creation), dangerous NOT NULL columns, and destructive column/table drops.

Input Schema

NameRequiredDescriptionDefault
sqlYesThe DDL SQL statement or multi-statement migration script to validate.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries full behavioral burden. It usefully discloses the rule categories checked (lock risks, NOT NULL, destructive drops), which implies static analysis without execution, but it never states whether a live database connection is required, whether the tool only reads, or how violations are reported back.

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?

One front-loaded sentence with the core purpose first and the detection categories after. Dense but every clause adds a distinct check; only mild redundancy between "DDL migrations" and "migration script" framing.

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?

There is no output schema, so the description should signal what comes back — a list of violations? pass/fail? severities? — and it does not. For a one-parameter validator, the input side is complete, but the result shape and any prerequisites are left for the agent to discover.

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?

The single parameter has 100% schema description coverage, so the baseline is 3 by rule. The description reinforces DDL/migration scope, which matches the schema, but adds no syntax rules, dialect notes, or batching constraints for multi-statement scripts beyond what the schema field already says.

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

Purpose4/5

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

Specific verb plus resource ("Analyze DDL migrations against zero-downtime safety rules") with concrete examples of what it flags: locking risks, NOT NULL columns, destructive drops. It is clearly distinguishable from siblings like db_dry_run or db_check_schema_drift, though it never names those siblings explicitly.

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 only implied: an agent can infer it should call this before applying a migration. There is no explicit when-to-use statement, no mention of when this is unnecessary, and no routing to alternatives such as db_dry_run or db_check_schema_drift.

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