Show what a migration should create
expected_objectsParses one migration with the real Postgres parser to list the database objects it should create, helping review changes before applying without connecting to a database.
Instructions
Parse one migration with the real Postgres parser and list what it should leave in the database: schemas, tables, columns (type, nullability), indexes, constraints, functions, triggers, row level security, policies, types and enum values, each with its line, plus statements that cannot be checked (UNVERIFIABLE) or have no lasting effect (ignored, e.g. BEGIN or SET). Never connects to a database. Use it to review a migration before applying it, or to understand a verify_migration result. Read-only: it reads migration files and pg_catalog inside a READ ONLY transaction, and never runs migration SQL or writes anything.
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": {
"file": "<file>"
},
"name": "expected_objects"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dir | No | Migrations directory. Relative paths are resolved against the project directory. It must be inside the project directory or the configured migrations directory. Omit to use the configured directory (PGMV_MIGRATIONS_DIR, default supabase/migrations). | |
| file | Yes | The migration: its file name (20240101120000_create_profiles.sql), a path ending in it, its version (20240101120000) or its name (create_profiles). Only exact matches count. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| notes | Yes | Statements that are not turned into catalog checks | |
| objects | Yes | ||
| statementCount | Yes |