Skip to main content
Glama
rog0x

mcp-database-tools

by rog0x

migration_generate

Compare old and new CREATE TABLE schemas to generate ALTER TABLE migration statements with both up and down migrations.

Instructions

Compare two schemas (old vs new CREATE TABLE statements) and generate ALTER TABLE migration statements with both up and down migrations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dialectNoSQL dialect for migration syntax (default: postgresql)
new_schemaYesThe new/target schema (CREATE TABLE statements)
old_schemaYesThe old/current schema (CREATE TABLE statements)
Behavior3/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states that both up and down migrations are generated, which is a useful behavioral detail. However, it does not disclose whether the tool is read-only, what happens for invalid or identical schemas, or any side effects. It also doesn't mention the return format (string vs object with up/down keys). This is a moderate gap given zero annotation coverage.

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?

The description is a single, efficient sentence that front-loads the primary action (compare) and specifies the output (ALTER TABLE migrations with up and down). No waste or filler. It could be slightly more structured (e.g., bullet points for inputs/outputs), but it's appropriately compact and readable.

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?

For a tool with 3 parameters, no output schema, and no annotations, the description is adequate but incomplete. It mentions the output nature (ALTER TABLE statements with up/down) but doesn't specify the exact return format (e.g., a single string, a JSON object with up/down fields, or a list). It also doesn't say whether multiple CREATE TABLE statements are supported in one input string. These are important details for an agent to correctly consume the result. Given the tool's moderate complexity, there is room for improvement.

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?

Input schema has 100% coverage, with clear descriptions for old_schema, new_schema, and dialect (enum). The description adds minimal extra meaning beyond the schema: it clarifies that schemas are CREATE TABLE statements and that migrations include both directions, but it doesn't explain the dialect enumeration or expected string formatting beyond the schema. Baseline 3 is appropriate since the schema carries the parameter definitions.

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 the tool's function: compare two schemas (old vs new CREATE TABLE statements) and generate ALTER TABLE migration statements with up and down versions. It names the specific resource (schemas), action (compare and generate), and output (migration statements). This distinguishes it from siblings like sql_format (formatting), query_build (building queries), sql_explain (explain plans), and schema_analyze (analysis).

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: when you have an old and new schema and want to generate migration SQL. It does not explicitly warn against using this tool for other tasks or mention alternatives. Sibling tools like schema_analyze might be preferred for analysis, but the description doesn't address any exclusions or routing. The guidance is implicit rather than explicit.

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/rog0x/mcp-database-tools'

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