SchemaSmith Documentation

Generation Tools

Create migration scripts, schema designs, and change analysis from your specifications — Ask Forge generates each one for your review and applies nothing automatically.

By the SchemaSmith Team · Last reviewed

Ask Forge Generation Tools

Tools that produce new content: table definitions, migration scripts, change analysis.

The Generation Tier

Ask Forge's 3 Tier 2 (Generation) tools use AI to create new content from your input — table definitions, migration scripts, and change analysis. Everything they produce is returned for your review; nothing is applied to your project automatically.

Generation tools require the Assistant trust level or higher (Observer cannot use them), and they build on every read-only capability of Tier 1. None of them prompt for confirmation — at the Assistant level they run immediately and hand you the result.

Schema Generation

Convert a JSON blueprint into complete, platform-correct table definitions ready to review and apply.

generate-schema MCP: schemasmith_generate_schema

Generate platform-specific table JSON from a structured blueprint. Returns the generated table definitions plus a health score — nothing is written to disk. Use apply-generated-schema (Tier 3) to save the result into your template.

Parameters: --blueprint (required) — JSON SchemaBlueprint describing the desired schema (name, tables, columns, relationships, options). --platform (optional) — Override the target platform (SqlServer, PostgreSQL, or MySQL); defaults to the loaded context platform.

Example:

ask-forge generate-schema --platform SqlServer \
  --blueprint '{"Name":"Sales","Tables":[{"Name":"Customer",
    "Columns":[{"Name":"CustomerID","Intent":"primary key"},
    {"Name":"Email","Intent":"email address"}]}]}'

Change Analysis

Analyze a proposed schema change and get a prioritized risk assessment with ready-to-run migration scripts.

suggest-changes MCP: schemasmith_suggest_changes

Analyze a proposed change and generate migration scripts with a risk assessment. Requires a selected template, and validates that the target table (and any referenced table) exists before running.

Parameters: --change-type (required)nullability, add_fk, change_type, or add_unique. --table (required) — Target table. --mode (optional)both (default), analyze, or generate. --column (for most change types in generate mode). --ref-table / --ref-column (for add_fk). --new-type (for change_type). --default-value (for nullability). --columns (comma-separated, for add_unique).

Example:

ask-forge suggest-changes --change-type add_fk \
  --table Sales.SalesOrderHeader --column TerritoryID \
  --ref-table Sales.SalesTerritory --ref-column TerritoryID

Connection Management

Store or clear a database connection for a platform, saved to the Ask Forge config file and used by the Tier 4 external tools.

manage-connection MCP: schemasmith_manage_connection

Set or clear the stored database connection for a platform. Each platform has one connection, and set updates fields incrementally — existing values are preserved. In the MCP server this tool is reached through discover-tools and execute-tool rather than the promoted tool list.

Parameters: --action (required)set or clear. --platform (required)SqlServer, PostgreSQL, or MySQL. --server (required for a new connection) — Host name. --port (optional) — Defaults to 1433 / 5432 / 3306. --database / --user / --password (optional). --connection-properties (optional) — JSON of extra connection-string properties.

Example:

ask-forge manage-connection --action set --platform SqlServer \
  --server localhost --port 1440 --database AdventureWorks \
  --user sa --password '<your-password>'