schemaGraph
schemaGraphAnalyze database schema relationships to reveal central or isolated tables, components, and cycle hints. Optionally compute the shortest path between two tables.
Instructions
Analyze schema-wide relationship topology: graph nodes/edges, central or isolated tables, components, cycle hints and an optional shortest path. Use findJoinPaths when only paths between two known tables are needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | ||
| toTable | No | Optional shortest-path target. | |
| maxDepth | No | Shortest-path hops (default 4). | |
| fromTable | No | Optional shortest-path start. | |
| maxTables | No | Tables to scan (default 50). | |
| connection | Yes | Database to run against. Call listConnections for valid names; do not guess. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edges | No | Relationship edges included in the graph response. | |
| nodes | No | Table nodes included in the schema graph response. | |
| cycles | No | Possible relationship or lineage cycles found during traversal. | |
| schema | No | ||
| edgeCount | Yes | Total number of relationship edges in the graph response. | |
| nodeCount | Yes | Number of table nodes in the schema graph. | |
| shortestPath | No | ||
| centralTables | No | Highest-degree tables that are likely hubs in the schema. | |
| tablesScanned | Yes | Number of tables inspected by the tool before caps were applied. | |
| isolatedTables | No | Tables with no visible relationships in the scanned schema graph. | |
| declaredEdgeCount | Yes | Number of graph edges backed by declared foreign keys. | |
| connectedComponents | No | Connected components discovered in the schema relationship graph. |