SchemaSmith Documentation

Read-Only Tools

24 tools for schema navigation, configuration, validation, analysis, search, and utilities.

Ask Forge Read-Only Tools

Observer Trust Level

Ask Forge Tier 1 tools operate in read-only mode. They inspect your schema project files, analyze structures, validate quality, and search content — but they never modify anything. These tools are available at the Observer trust level, the most restrictive setting.

All Ask Forge sessions start with Tier 1 access by default. No additional configuration is needed to use these tools.

Context & Navigation

View the current working context, list available schemas, templates, folders, and scripts.

show-context MCP: forge_show_context

Show current product, template, and table selection.

Parameters: None.

Example:

ask-forge show-context
show-table MCP: forge_show_table

Show table structure including columns, keys, and indexes.

Parameters: --table (optional) — Table name to show. Uses currently selected table if omitted.

Example:

ask-forge show-table --table Customers
list-tables MCP: forge_list_tables

List all tables in the current template.

Parameters: --verbose (optional) — Include column counts and key information.

Example:

ask-forge list-tables --verbose true
list-templates MCP: forge_list_templates

List all templates in the current product.

Parameters: None.

Example:

ask-forge list-templates
list-folders MCP: forge_list_folders

List all script folders with summary info.

Parameters: None.

Example:

ask-forge list-folders
list-scripts MCP: forge_list_scripts

List scripts in a specified folder.

Parameters: --folder (required) — Name of the script folder to list contents of.

Example:

ask-forge list-scripts --folder PreDeploy

Configuration

Inspect current Forge configuration, database connections, and platform capabilities.

show-config MCP: forge_show_config

Show current configuration including database connections and tool paths.

Parameters: --section (optional) — Specific section to show: connections, tools, or all (default).

Example:

ask-forge show-config --section connections
list-connections MCP: forge_list_connections

List configured database connections with server and user info.

Parameters: --platform (optional) — Filter by platform (MSSQL or PostgreSQL). Lists all if omitted.

Example:

ask-forge list-connections --platform MSSQL
show-platform-capabilities MCP: forge_show_platform_capabilities

Show platform feature support, naming rules, and capabilities for the current or specified platform.

Parameters: --platform (optional) — Platform to show capabilities for. Defaults to current context platform.

Example:

ask-forge show-platform-capabilities --platform PostgreSQL

Data Validation

Generate SQL queries to validate data quality and check for common integrity issues.

check-nulls MCP: forge_check_nulls

Generate a query to check for NULL values in a column.

Parameters: --table (required) — Table name. --column (required) — Column name to check.

Example:

ask-forge check-nulls --table Orders --column ShippedDate
check-orphans MCP: forge_check_orphans

Generate a query to check for orphaned foreign key references.

Parameters: --table (required) — Table name. --foreignKey (optional) — Specific foreign key to check. Checks all FKs if omitted.

Example:

ask-forge check-orphans --table OrderDetails \
  --foreignKey FK_OrderDetails_Products
check-duplicates MCP: forge_check_duplicates

Generate a query to check for duplicate values in specified columns.

Parameters: --table (required) — Table name. --columns (required) — Comma-separated column names to check.

Example:

ask-forge check-duplicates --table Employees \
  --columns "FirstName,LastName"
check-naming MCP: forge_check_naming

Check naming conventions for tables, columns, indexes, constraints, and foreign keys against platform rules.

Parameters: --tables (optional) — Comma-separated table names to check. Checks all tables if omitted.

Example:

ask-forge check-naming --tables "Orders,Customers"

Schema Analysis

Analyze schema structure, dependencies, conventions, indexes, and plan migrations.

show-dependencies MCP: forge_show_dependencies

Show foreign key dependency graph for a table — what it references and what references it.

Parameters: --table (required) — Table name. --direction (optional)both, references, or referenced_by (default: both).

Example:

ask-forge show-dependencies --table Orders --direction references
show-all-dependencies MCP: forge_show_all_dependencies

Show all foreign key relationships across the entire template — a full dependency map.

Parameters: --format (optional) — Output format: list for flat list of all FKs, or grouped to group by source table (default: list).

Example:

ask-forge show-all-dependencies --format grouped
analyze-dependency-graph MCP: forge_analyze_dependency_graph

Analyze the foreign key dependency graph — detect circular dependencies, topological ordering, cascade impact analysis, or full graph summary.

Parameters: --analysis (required) — One of: graph, circular, cascade, topological, all. --table (optional) — Required for cascade analysis.

Example:

ask-forge analyze-dependency-graph --analysis circular
ask-forge analyze-dependency-graph --analysis cascade \
  --table Products
show-conventions MCP: forge_show_conventions

Detect and display naming conventions from the current template including PK patterns, common columns, and naming styles.

Parameters: None.

Example:

ask-forge show-conventions
diff-tables MCP: forge_diff_tables

Compare two table definitions and show differences in columns, indexes, and foreign keys.

Parameters: --table1 (required) — First table name. --table2 (required) — Second table name.

Example:

ask-forge diff-tables --table1 Customers --table2 Suppliers
review-schema MCP: forge_review_schema

Run a comprehensive schema review and return findings with severity, recommendations, and fix scripts.

Parameters: --tables (optional) — Comma-separated table names (default: all). --categories (optional) — Comma-separated categories: naming, indexing, types, relationships, nullability (default: all).

Example:

ask-forge review-schema --tables "Orders,OrderDetails" \
  --categories "indexing,nullability"
analyze-indexes MCP: forge_analyze_indexes

Analyze index coverage for tables, identifying missing indexes on FK columns and redundant indexes.

Parameters: --table (optional) — Specific table name to analyze. Analyzes all tables if omitted.

Example:

ask-forge analyze-indexes --table Orders
plan-migration MCP: forge_plan_migration

Compare schema templates between two git refs and produce a dependency-ordered migration plan with SQL scripts and data advisories.

Parameters: --source_ref (required) — Git ref for the source schema version. --target_ref (optional) — Git ref for the target version (default: working). --template (optional) — Template name. --platform (optional) — Database platform.

Example:

ask-forge plan-migration --source_ref v1.0 --target_ref v2.0
ask-forge plan-migration --source_ref main \
  --template AdventureWorks --platform MSSQL

Utilities

General-purpose tools for validating data and viewing logs.

validate-json MCP: forge_validate_json

Validate table or template JSON structure for missing fields, invalid references, and other issues.

Parameters: --scope (optional) — Scope of validation: current_table, current_template, or all (default).

Example:

ask-forge validate-json --scope current_template
view-log MCP: forge_view_log

View or open external tool log files.

Parameters: --log_path (required) — Path to the log file to view. --tail_lines (optional) — Number of lines to return from end of file (default: 50). --open_external (optional) — Open log file in system text editor instead of returning content.

Example:

ask-forge view-log --log_path /var/log/forge/schema-tongs.log \
  --tail_lines 100

Related Documentation