Skip to main content
Glama

audit_migration_directory

Read-onlyIdempotent

Scans Prisma, Drizzle, Flyway, or raw .sql migration directories recursively for CRITICAL and HIGH lock-queue and full-table-rewrite hazards before deployment.

Instructions

Recursively scans Prisma, Drizzle, Flyway, or raw .sql migration directories for CRITICAL and HIGH deployment lock-queue and full-table-rewrite hazards.

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": {
      "directoryPath": "<directoryPath>"
    },
    "name": "audit_migration_directory"
  }
}

Input Schema

NameRequiredDescriptionDefault
qpsNoDefault peak production QPS used for blast-radius scoring (defaults to 800).
strictNoWhen true, marks status as BLOCKED on HIGH or MEDIUM findings in addition to CRITICAL findings.
dialectNoSQL dialect override applied across discovered .sql files (defaults to auto).
tableRowsNoDefault table row count used for blast-radius scoring (defaults to 10000000).
directoryPathYesLocal directory path (such as prisma/migrations, drizzle, or sql) containing .sql migration files.
onlyFlaggedFilesNoWhen true, omits clean 0-hazard .sql files from the per-file breakdown array.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

The annotations already declare read-only, idempotent, non-destructive, and closed-world behavior, so the safety profile is covered. The description adds useful scanning scope: recursive traversal, supported migration frameworks, and the specific lock-queue and full-table-rewrite hazard focus. It does not explain the returned findings, scoring behavior, or how strict blocking is applied, leaving those details to the schema.

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

Conciseness5/5

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

The description is a single, front-loaded sentence with no wasted wording. It efficiently states the scan behavior, supported directory types, and hazard categories.

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?

The description covers the core purpose but is thin for a six-parameter audit tool with no output schema. It does not explain the return shape, per-file breakdown, status/blocking behavior, or how blast-radius scoring uses qps and tableRows. The annotations and fully described schema compensate partially, making it adequate but with clear gaps.

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%, so the input schema already documents directoryPath, qps, strict, dialect, tableRows, and onlyFlaggedFiles. The description does not add any parameter-specific meaning beyond what the schema provides. This is the expected baseline when the schema does the heavy lifting.

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?

The description states a specific verb and resource: recursively scans Prisma, Drizzle, Flyway, or raw .sql migration directories. It also narrows the purpose to CRITICAL and HIGH deployment lock-queue and full-table-rewrite hazards. It does not differentiate this directory-level audit from sibling tools such as audit_sql_migration_locks.

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

Usage Guidelines2/5

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

The description implies that this tool is for auditing migration directories, but it gives no explicit when-to-use guidance. It does not name alternatives or explain when an agent should choose this tool over audit_sql_migration_locks or estimate_ddl_blast_radius.

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