Skip to main content
Glama

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the migrations directory
patternNoGlob pattern for SQL files, relative to path (default: **/*.sql, or the config's migrationPath)
pgVersionNoTarget PostgreSQL version. Defaults to the config's pgVersion, or 17.
Behavior3/5

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

With no annotations provided, the description carries the full burden of disclosure. It mentions the output structure (per-file results plus aggregate summary) and implies a read-only analysis, but it does not explicitly state that files are not modified, nor does it mention any requirements or side effects. This is useful context but leaves gaps about safety and exact behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core action, and includes return format and usage guidance without any fluff. Every word adds value, making it highly concise and well-structured.

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

Completeness4/5

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

Given the tool has 3 parameters, no output schema, and no annotations, the description covers the main purpose, output shape, and suggested use cases. It stops short of explaining what 'analyze' means in terms of rules or checks, but the sibling tools like 'list_rules' and 'get_rule' imply a rule system. Overall, it is fairly complete for making an informed selection.

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?

The schema description coverage is 100%, so the input schema already documents all three parameters (path, pattern, pgVersion) with clear descriptions. The tool description adds no additional parameter-level meaning, so a baseline score of 3 is appropriate.

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 clearly states 'Analyze every migration file in a directory' with a specific verb and resource scope, distinguishing it from the sibling 'analyze_migration' by emphasizing directory-wide analysis. It also notes the return format (per-file results plus aggregate summary), making the purpose unmistakable.

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?

The description provides explicit usage context: 'Use this to audit a whole migrations folder before a release, or to find which existing migration introduced a risky pattern.' This clearly indicates when to choose this tool over alternatives, though it does not explicitly name the single-file sibling or give exclusion criteria.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mickelsamuel/migrationpilot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server