Skip to main content
Glama
MCPg - Production-grade PostgreSQL MCP Server

MCPg - Production-grade PostgreSQL MCP Server

Read migration history

read_migration_history
Read-only

Retrieves and summarizes applied database migration history across Alembic, Flyway, Diesel, Django, Prisma, Golang Migrate, Goose, and Sequelize, with optional schema filtering.

Instructions

Query and summarize historical migrations applied to the database by popular migration frameworks (Alembic, Flyway, Diesel, Django, Prisma, Golang Migrate, Goose, Sequelize). Allows filtering by schema. Returns an object with one optional list per detected framework: alembic, flyway, diesel, django, prisma, golang_migrate, goose, sequelize. Each entry is null when the framework's table isn't present; otherwise it carries the framework-specific row shape (e.g. alembic has {version_num}; flyway has {installed_rank, version, description, type, ...}).

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": "read_migration_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
schemaNo
databaseNoOptional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected.

Output Schema

NameRequiredDescriptionDefault
gooseNo
dieselNo
djangoNo
flywayNo
prismaNo
alembicNo
sequelizeNo
golang_migrateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.4
    • changedInput schema / properties / database / description
      Previous value: -"Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids."New value: +"Optional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected."
  2. First observedv0.6.8

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered; the description adds genuine behavioral context by explaining the detection model (per-framework lists, null when the framework's table isn't present) and giving example row shapes. It stops short of mentioning cost, edge cases like permission-restricted framework tables, or behavior on unreachable databases.

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?

Front-loaded with the core action and scope, followed by return-shape detail. The framework enumeration and row-shape examples are somewhat verbose given an output schema exists, but they are informative rather than filler.

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?

With only two optional parameters and an output schema, the description covers what the tool does and what it returns, but leaves the `schema` parameter's semantics ambiguous and offers no guidance on framework detection failure or empty results. Adequate but with a visible gap on the one undocumented parameter.

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 coverage is only 50%: the `database` parameter is well documented in the schema, but `schema` has no schema-level description. The description partly compensates by saying 'Allows filtering by schema', yet it does not clarify default scope (all schemas?), naming conventions, or how an invalid schema is handled, so the gap is only half bridged.

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?

States a specific verb and resource — 'Query and summarize historical migrations applied to the database' — and enumerates the frameworks it detects (Alembic, Flyway, Django, Prisma, etc.), which no sibling tool does. An agent can immediately tell this apart from schema-generation siblings like generate_prisma_schema or general introspection tools like list_tables.

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

Usage Guidelines3/5

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

The description implies the use case (inspecting already-applied migrations across frameworks) and notes schema filtering, but never states when to prefer this over alternatives such as generate_prisma_schema/generate_drizzle_schema or when it is not appropriate. Usage is inferable but not guided.

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

Deploy Server

Other Tools