4 tools for executing SchemaSmith applications against live databases.
Tier 4 tools execute external SchemaSmith applications — SchemaTongs, SchemaQuench, and DataTongs — through the Ask Forge interface. These tools interact with live databases for schema extraction, deployment, and data extraction.
Because these tools connect to real databases, they require the Operator trust level. Every execution prompts for confirmation before running (controlled by the confirmTier4 setting). They also require that the corresponding SchemaSmith binaries are installed and their paths are configured.
Operator trust level includes all Tier 1, 2, and 3 capabilities.
run-schema-tongs
MCP: forge_run_schema_tongs
Extract schema from a live database into SchemaSmith JSON format. SchemaTongs reads catalog metadata (tables, columns, indexes, constraints, foreign keys) and writes the extracted schema as organized packages and templates.
Requires confirmation before execution. Use --yes to skip in CLI mode.
| Parameter | Type | Description |
|---|---|---|
--database | string | Database name (overrides the value from the saved connection) |
--output-path | string | Output directory for extracted schema (default: current product path or working directory) |
--object-filter | string | Comma-separated list of specific objects to extract (schema.name or just name). Filters any object type, not just tables |
--platform | string | Database platform: MSSQL, MySQL, or PostgreSQL (auto-detected from context if not specified) |
--product-name | string | Product name for new extractions (required when extracting to a fresh directory) |
--template-name | string | Template name for new extractions (default: database name) |
--log-path | string | Directory for log files (default: output_path/Logs) |
Control which object types are extracted. All default to true unless noted.
| Parameter | Default | Description |
|---|---|---|
--extract-tables | true | Extract tables |
--extract-views | true | Extract views |
--extract-procedures | true | Extract stored procedures |
--extract-functions | true | Extract user-defined functions |
--extract-triggers | true | Extract triggers |
--extract-schemas | true | Extract schemas |
| Parameter | Default | Description |
|---|---|---|
--extract-types | true | Extract user-defined types |
--extract-catalogs | false | Extract full-text catalogs |
--extract-stoplists | false | Extract stop lists |
--extract-ddl-triggers | false | Extract DDL triggers |
--extract-xml-schemas | false | Extract XML schema collections |
--script-dynamic-dependency-removal | false | Script dynamic dependency removal for functions (drops computed column dependencies before function updates) |
| Parameter | Default | Description |
|---|---|---|
--extract-events | true | Extract scheduled events |
| Parameter | Default | Description |
|---|---|---|
--extract-domain-types | true | Extract domain types |
--extract-enum-types | true | Extract enum types |
--extract-composite-types | true | Extract composite types |
--extract-aggregates | true | Extract aggregate functions |
--extract-sequences | true | Extract sequences |
--extract-rules | true | Extract rules |
Example:
ask-forge run-schema-tongs --platform mssql \
--product-name MyProduct
Returns: Extraction progress, summary of extracted objects (table count, index count, etc.), and the output directory path.
Platforms: Available for SQL Server, PostgreSQL, and MySQL — each with a platform-specific binary.
run-schema-quench
MCP: forge_run_schema_quench
Apply schema JSON to a target database. SchemaQuench reads your SchemaSmith JSON definitions, compares them against the current database state, and generates and executes the DDL needed to bring the database in line. Defaults to dry-run mode — set --dry-run false to apply changes for real.
Requires confirmation before execution. Use --yes to skip in CLI mode.
| Parameter | Type | Default | Description |
|---|---|---|---|
--template | string | current | Template to apply |
--dry-run | boolean | true | Preview changes without applying (default: true for safety) |
--platform | string | — | Database platform: MSSQL, MySQL, or PostgreSQL (auto-detected from context if not specified) |
--log-path | string | — | Directory for log files (default: product_path/Logs) |
--max-threads | integer | 10 | Parallel execution threads (1–20) |
--run-scripts-twice | boolean | false | Run scripts twice for dependency resolution |
--drop-removed-tables | boolean | false | Drop tables not in schema product |
--update-tables | boolean | true | Update existing tables |
--kindle-forge | boolean | true | Execute pre/post scripts |
--deliver-data | boolean | true | Apply data scripts |
--checkpoint-dir | string | — | Checkpoint directory for resume capability (defaults to log_path) |
--resume | boolean | false | Resume from last checkpoint instead of starting fresh |
| Parameter | Type | Description |
|---|---|---|
--verbose | boolean | Enable verbose logging (include PRINT messages in output) |
--secondary-servers | string | Comma-separated list of secondary servers in availability group to update (e.g., SQL Agent jobs) |
Example:
ask-forge run-schema-quench --platform mssql
Returns: Deployment progress, list of applied changes, and success/failure status for each operation.
Platforms: Available for SQL Server, PostgreSQL, and MySQL — each with a platform-specific binary.
run-data-tongs
MCP: forge_run_data_tongs
Extract table data from a database to JSON content files and MERGE scripts. DataTongs reads from the target database and produces files suitable for data population during SchemaQuench deployments.
Requires confirmation before execution. Use --yes to skip in CLI mode.
| Parameter | Type | Default | Description |
|---|---|---|---|
--database | string | — | Database name (overrides the value from the saved connection) |
--platform | string | — | Database platform: MSSQL, MySQL, or PostgreSQL (auto-detected from context if not specified) |
--script-path | string | — | Output directory for MERGE SQL scripts (default: working directory) |
--content-path | string | — | Output directory for table content JSON files (default: working directory) |
--log-path | string | — | Directory for log files (default: script_path/Logs) |
--tables | string | — | JSON array of table configurations (see below) |
--output-content-files | boolean | false | Generate .tabledata JSON files containing table contents |
--output-scripts | boolean | true | Generate SQL MERGE scripts for data population |
--tokenize-scripts | boolean | false | Replace JSON content in scripts with named tokens for deferred data loading |
--disable-triggers | boolean | false | Disable triggers during merge operations |
--merge-update | boolean | true | Include UPDATE logic in MERGE statements for existing rows |
--merge-delete | boolean | false | Include DELETE logic in MERGE statements for rows not in source |
| Parameter | Type | Default | Description |
|---|---|---|---|
--disable-rules | boolean | false | Disable rules during merge operations |
--update-descendents | boolean | true | Update descendent tables during merge |
The --tables parameter accepts a JSON array. Only name is required per entry.
| Property | Required | Description |
|---|---|---|
name | Yes | Table name in schema.table format (e.g., dbo.Users) |
keyColumns | No | Comma-separated key columns for MERGE matching |
selectColumns | No | Comma-separated columns to extract (default: all columns) |
filter | No | SQL WHERE clause to filter extracted rows |
Example:
ask-forge run-data-tongs \
--tables '[{"name":"dbo.Users","keyColumns":"UserId"},{"name":"dbo.Roles"}]'
Returns: Extraction progress and the output file paths for generated scripts and content files.
Platforms: Available for SQL Server, PostgreSQL, and MySQL — each with a platform-specific binary.
view-log
MCP: forge_view_log
View or open external tool log files. After running SchemaTongs, SchemaQuench, or DataTongs, use this tool to inspect progress and error logs without leaving the Ask Forge interface.
| Parameter | Type | Required | Description |
|---|---|---|---|
--log-path | string | Yes | Path to the log file to view |
--tail-lines | integer | No | Number of lines to return from end of file (default: 50) |
--open-external | boolean | No | Open log file in system text editor instead of returning content |
Example:
ask-forge view-log \
--log-path ./Logs/"SchemaQuench - Errors.log" \
--tail-lines 200
Returns: Log file contents (tail), or opens the file in your default text editor if --open-external is set.
Each platform has its own documentation for SchemaTongs, SchemaQuench, and DataTongs. These pages cover platform-specific options, connection strings, and usage details.