Skip to content

Tools ​

Every tool below issues read-only catalog queries or validated SELECT / WITH statements. Mutating SQL is rejected before execution.

Core query ​

ToolDescription
execute_queryRun a read-only SELECT / WITH query
health_checkCheck connectivity and connection-pool stats

Database discovery ​

ToolDescription
list_databasesList accessible databases
list_schemasList schemas in the current database
list_tablesList tables with row and column counts
describe_tableColumns, keys, and indexes of a table
list_columnsColumns with types and nullability
describe_columnDetailed metadata for a single column
table_row_countRow count from catalog metadata

Relationships and keys ​

ToolDescription
table_relationshipsOutbound and inbound foreign keys
list_foreign_keysForeign-key constraints, optionally by schema
list_primary_keysPrimary-key constraints, optionally by schema
foreign_key_graphFull foreign-key graph as nodes and edges
list_unique_constraintsUnique constraints by schema
list_check_constraintsCheck constraints by schema
list_default_constraintsDefault constraints by schema

Stored procedures ​

ToolDescription
list_proceduresList stored procedures
get_procedure_definitionFull T-SQL definition and parameters
search_proceduresSearch definitions by keyword
analyze_stored_procedureStatic analysis: tables, views, transactions, and more
extract_tables_usedTables referenced by a procedure
extract_views_usedViews referenced by a procedure
extract_functions_usedFunctions referenced by a procedure
extract_called_proceduresProcedures called with EXEC
extract_transaction_usageTransaction-control usage
extract_dynamic_sqlDynamic SQL detection
extract_cursor_usageCursor declarations
extract_temp_tablesTemp-table usage
extract_error_handlingError-handling constructs
extract_validation_rulesValidation rules
extract_business_rulesBusiness-rule comments

Views ​

ToolDescription
list_viewsList all views
get_view_definitionDefinition of a view
analyze_viewColumns and referenced objects
trace_view_sourcesResolve underlying base tables
extract_view_dependenciesObjects a view depends on

Functions ​

ToolDescription
list_functionsScalar, inline, and table-valued functions
get_function_definitionDefinition and parameters
analyze_functionStatic analysis
trace_function_usageObjects referencing the function
extract_function_dependenciesObjects a function depends on

Triggers ​

ToolDescription
list_triggersDML triggers with their tables
get_trigger_definitionDefinition of a trigger
analyze_triggerStatic analysis
ToolDescription
find_object_dependenciesObjects an object depends on
find_object_referencesObjects that reference an object
find_table_usageAll objects referencing a table
search_objects_by_keywordSearch names and definitions
generate_erdEntity-relationship description
dependency_graphRecursive dependency graph
find_column_usageModules referencing a column
find_unused_tablesTables with no references
find_unused_columnsColumns with no tracked references
find_orphan_tablesTables with no foreign-key connections
find_circular_dependenciesCycles in the foreign-key graph
search_tablesTables matching a keyword
search_columnsColumns matching a keyword
search_viewsViews matching a keyword
search_functionsFunctions matching a keyword

Data profiling ​

ToolDescription
table_statisticsRow count, column count, and storage stats
column_statisticsMin, max, distinct, and null statistics
column_distinct_valuesTop distinct values with frequencies
column_null_analysisNull count and percentage
data_distributionValue-frequency distribution
sample_table_dataSample rows from a table
find_duplicate_rowsDuplicate groups by columns
find_candidate_keysSingle-column candidate-key detection

Performance analysis ​

ToolDescription
explain_queryEstimated execution plan
estimate_query_costEstimated subtree cost
analyze_execution_planPlan with an operator summary
find_missing_indexesOptimizer-recommended indexes
find_unused_indexesIndexes that are never read
find_fragmented_indexesHigh-fragmentation indexes
index_usage_reportRead and write stats for all indexes
slow_query_analysisMost expensive cached queries
query_performance_reportAggregate query stats

Security analysis ​

ToolDescription
list_loginsServer-level logins
list_usersDatabase-level users
list_rolesDatabase roles
list_permissionsDatabase permission grants
user_permissionsPermissions for a specific user
role_membershipsRole-membership graph
object_permissionsPermissions on a specific object

Migration assessment ​

ToolDescription
database_overviewHigh-level object counts
database_health_reportHealth indicators
database_complexity_reportStructural complexity metrics
analyze_database_for_migrationComprehensive migration assessment
migration_complexity_scoreWeighted complexity score
migration_priority_orderDependency-based migration order
high_risk_objectsModules with risky constructs
large_table_analysisLargest tables by storage
legacy_object_analysisStale or legacy objects
deprecated_feature_detectionDeprecated-feature scan

Monitoring ​

ToolDescription
connection_pool_statsConnection-pool statistics
database_size_reportData and log file sizes
table_growth_reportLargest tables by size