analyze_migration_dir
Audit all migration files in a directory to identify risky patterns before release. Returns per-file analysis and an aggregate summary for the entire folder.
Instructions
Analyze every migration file in a directory. Returns per-file results plus an aggregate summary. Use this to audit a whole migrations folder before a release, or to find which existing migration introduced a risky pattern.
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": {
"path": "<path>"
},
"name": "analyze_migration_dir"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the migrations directory | |
| pattern | No | Glob pattern for SQL files, relative to path (default: **/*.sql, or the config's migrationPath) | |
| pgVersion | No | Target PostgreSQL version. Defaults to the config's pgVersion, or 17. |