Skip to main content
Glama
Teradata

Teradata MCP Server

Official
by Teradata

Graph Connectedcomponents

graph_connectedComponents
Read-onlyIdempotent

Partition a dependency graph into weakly connected components to identify isolated subgraphs and scope impact analysis.

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

TableJSON Schema
NameRequiredDescriptionDefault
edge_repositoryNo
exclude_objectsNo
container_patternYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.1

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnlyHint and idempotentHint annotations, the description discloses key behavioral details: it is a pure-Python implementation, requires no stored procedure, issues a single SQL SELECT, and runs Union-Find in the MCP server process. It also documents the full response structure, which is especially valuable since no output schema exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but well-organized with headers, bullets, examples, and a return-structure breakdown. Every section adds necessary information for correct invocation, and the critical parameter caveat is highlighted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity, three parameters, and absent output schema, the description is complete: it covers the algorithm, scope, parameter contracts, response fields, and use cases. An agent has everything needed to select and invoke this tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden, and it does so thoroughly. Each parameter gets semantics, examples, defaults, matching behavior, and a critical STRING-not-array warning for container_pattern. The edge_repository contract and how to generate it via graph_edgeContractDDL are also given.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Identify all Weakly Connected Components (WCC) in the dependency graph.' It then defines the component semantics clearly, which distinguishes this from sibling graph tools like graph_detectCycles, graph_findRootObjects, and graph_traceLineage.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'Use this tool for' bullet list gives explicit application contexts, including pre-filtering before cycle detection and blast-radius estimation. It does not name specific sibling alternatives or state when not to use it, but the guidance is clear enough for an agent to route correctly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.