Skip to main content
Glama
pg-migration-verify
by ColeUD

List repository migrations

list_repo_migrations
Read-onlyIdempotent

Lists repository migration files in Supabase apply order with SHA-256 hashes and flags skipped SQL files or duplicate versions, so you can identify migrations and exact filenames for verification.

Instructions

List the migration files in the repository (Supabase layout _.sql), in apply order (by file name, as the Supabase CLI applies them), with the sha256 of each file. Also reports .sql files the Supabase CLI would skip because of their name and versions used by more than one file. Use it to see which migrations exist or to find the exact file name for the other tools. Needs no database. 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

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_repo_migrations"
  }
}

Input Schema

NameRequiredDescriptionDefault
dirNoMigrations 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).

Output Schema

NameRequiredDescriptionDefault
filesYes
skippedYes.sql files the Supabase CLI never applies because of their name
directoryYesMigrations directory, relative to the project directory when it is inside it
duplicateVersionsYesVersions used by more than one file

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint/idempotent and non-destructive, but the description goes further: it says pg_catalog is read inside a READ ONLY transaction, that migration SQL is never executed, that nothing is written, and that no database is required. It also discloses ordering semantics (file-name order, matching the Supabase CLI) and the extra diagnostic outputs, which an agent could not infer from structured fields.

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?

Purpose and scope are front-loaded in the first sentence, and the ordering/sha256 details follow logically. The closing read-only sentence partly restates the annotations ("never writes anything"), which is mildly redundant, but it is the only padding in an otherwise dense passage.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With a full output schema available, the description need not enumerate return fields, and it does not attempt to; it just names the notable ones (sha256, skipped files, duplicate versions). Combined with the single fully documented parameter and rich annotations, an agent has everything needed to call this correctly and interpret it.

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% and there is only one optional parameter (dir), whose resolution rules and defaults are fully spelled out in the schema itself. The description adds nothing about the parameter – notably it never mentions that path containment is enforced – so the baseline 3 applies.

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

Purpose5/5

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

The description opens with a concrete verb and resource ("List the migration files in the repository") and immediately pins down the naming layout, apply order, and sha256 inclusion. It also states two secondary outputs (skipped .sql files and duplicate versions), which cleanly separates it from a sibling like list_recorded_migrations that presumably deals with recorded/applied state rather than on-disk files.

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

Usage Guidelines4/5

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

It gives an explicit when-to-use: "Use it to see which migrations exist or to find the exact file name for the other tools" – that is a real routing statement tying it to downstream tools. It also states "Needs no database," which implicitly distinguishes it from DB-backed siblings, but it never names those siblings or says when not to use it, so it stops short of a 5.

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