pg-migration-guard
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Call analyze_migration on any Postgres migration before running it, and apply the suggested fixes.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| analyze_migrationA | Analyzes Postgres migration SQL and reports statements that lock tables, rewrite them, or break running code (CREATE INDEX without CONCURRENTLY, volatile defaults, SET NOT NULL, foreign keys without NOT VALID, renames, missing lock_timeout, ...). Call this before running or committing any migration. Each finding includes a safer rewrite. |
| list_rulesA | Lists every rule pg-migration-guard checks, with its severity. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 2 tools
The two tools have clearly distinct roles: analyze_migration performs SQL analysis, while list_rules only enumerates available rules and severities. There is no plausible overlap or risk of misselection.
Both names follow the same snake_case verb_noun convention: analyze_migration and list_rules. The pattern is predictable and immediately readable.
Two tools is slightly below the typical 3-15 range, but the server has a very narrow purpose and both tools earn their place. It is well-scoped rather than padded or trivially thin.
The core workflow is covered: analyze a migration and discover what rules exist. Minor gaps remain, such as retrieving detailed per-rule documentation or configuring/ignoring rules, but agents can work without them.