graph_connectedComponents
Identify all weakly connected components in a dependency graph to find isolated sub-graphs and scope impact analysis. Uses Union-Find partitioning on fetched edges without stored procedures.
Instructions
Identify all Weakly Connected Components (WCC) in the dependency graph.
Pure-Python implementation — no stored procedure required. Issues a single SQL SELECT to fetch the scoped edge set, then performs Union-Find WCC partitioning entirely in the MCP server process.
A connected component is a maximal set of nodes where every node can reach every other node when edge direction is ignored. This partitions the graph into isolated sub-graphs.
Use this tool for:
Understanding graph structure and partitioning
Identifying isolated sub-graphs
Scoping downstream impact analysis to a single component
Pre-filtering before cycle detection (cycles exist only within a component)
Identifying "islands" of related objects for migration or refactoring
Estimating blast radius
Arguments: container_pattern - str: CSV LIKE patterns for container scope. Supports wildcards (%) and CSV format. Examples: '%WBC%', '%WBC%,%StGeo%', 'DEV01_%,DEV02_%'
CRITICAL: STRING type, not array.
CORRECT: container_pattern="%WBC%,%StGeo%"
WRONG: container_pattern=["%WBC%", "%StGeo%"]exclude_objects - str: CSV LIKE patterns to exclude. Matches against container name (or DB.Object if the pattern contains a dot). Default: '' (no exclusions)
edge_repository - str: Edge repository view/table conforming to the Graph Edge Contract (Src_Container_Name, Src_Object_Name, Src_Kind, Tgt_Container_Name, Tgt_Object_Name, Tgt_Kind columns). For AI-Native Data Products use: '{ProductName}_Semantic.lineage_graph' Call graph_edgeContractDDL to generate a new one. Required — no default.
Returns: ResponseType: formatted response with connected component results.
Response structure: { "node_details": [...], // One row per node with Component_Id "component_summaries": [...], // One row per component "summary_stats": [...] // Single aggregate row }
node_details row fields: Node_FQ, DatabaseName, ObjectName, Component_Id, Object_Kind
component_summaries row fields: Component_Id, Node_Count, Node_List
summary_stats row fields: Component_Count, Node_Count, Edge_Count, Largest_Component, Smallest_Component, Singleton_Count, Summary_Message
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| container_pattern | Yes | ||
| exclude_objects | No | ||
| edge_repository | No |