Skip to main content
Glama

schema_generate_migration

Resolve schema drift by comparing current schema files with desired changes and generating a migration file. Provide the schema path and change description, and receive ready-to-run migration code for your ORM.

Instructions

Compare current schema with desired state and generate a migration file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ormNoORM or migration tool in useraw-sql
api_keyNo
db_typeNopostgres
current_schemaYesPath to current schema file or migration directory
desired_changesYesDescription of desired schema changes (e.g., 'add email_verified boolean to users table')
Behavior3/5

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

With no annotations, the description must carry the behavioral disclosure burden. It does state that the tool compares and generates a migration file, which is a meaningful behavioral claim. However, it does not clarify whether the file is written to disk, returned, or whether api_key is required for an external service, leaving notable gaps.

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?

One concise, front-loaded sentence with no filler. It states the action and the artifact in eleven words, making it easy to scan and parse.

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?

The core purpose and key inputs are clear, but the definition lacks usage guidance, output/return behavior, and an explanation of api_key. Given no output schema and no annotations, this leaves an agent with meaningful ambiguity for a five-parameter tool.

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 description maps loosely to the two required parameters (current_schema and desired_changes) but adds no information beyond their schema descriptions. The undocumented api_key parameter is not explained, and orm/db_type are only surfaced through enums, so the description does not fully compensate for the 60% schema coverage.

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 uses a specific action ('compare' and 'generate') and names the concrete deliverable ('migration file'). It distinguishes from sibling tools like schema_detect_drift and schema_validate_migration by making the generation goal explicit.

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 primary use case—when a schema change needs to be turned into a migration file—but does not explicitly state when to choose this over schema_detect_drift or schema_validate_migration. No prerequisites, exclusions, or alternative conditions are provided.

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/barnburner121/claude-plugin-marketplace'

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