Skip to content
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ test_*.py
.planning/
.ruff_cache/
Start_MCP_Server.bat

15 changes: 15 additions & 0 deletions src/teradata_mcp_server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from teradata_mcp_server.config import Settings
from teradata_mcp_server.middleware import RequestContextMiddleware
from teradata_mcp_server.tools import ContextCatalog
from teradata_mcp_server.tools.graph.graph_edge_contract import GRAPH_EDGE_CONTRACT
from teradata_mcp_server.tools.utils import (
convert_tdml_docstring_to_mcp_docstring,
execute_analytic_function,
Expand Down Expand Up @@ -1287,5 +1288,19 @@ def get_glossary_term(term_name: str) -> dict[str, Any]:
else:
return {"error": f"Glossary term not found: {term_name}"}

# ── Graph Edge Contract Resource ──────────────────────────────────────
# Always registered (static content, no YAML dependency).
# AI agents retrieve this to understand the edge_repository schema
# required by all graph_* tools.
# ──────────────────────────────────────────────────────────────────────
if any(re.match(pattern, "graph_edge_contract") for pattern in config.get("resource", [])):

@mcp.resource("graph://edge-contract")
def get_graph_edge_contract() -> str:
"""Return the Graph Edge Contract schema definition."""
return GRAPH_EDGE_CONTRACT

logger.info("Registered resource: graph_edge_contract")

# Return the configured app and some handles used by the entrypoint if needed
return mcp, logger
13 changes: 11 additions & 2 deletions src/teradata_mcp_server/config/profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ eda:
- "base_(?!(writeQuery|dynamicQuery)$).*"
- qlty_.*
- sec_userDbPermissions

bar:
tool:
- ^bar_*
Expand All @@ -60,4 +60,13 @@ llmUser:
- ^base_*
- ^chat_*
prompt:
- ^chat_*
- ^chat_*

graph:
tool:
- ^graph_.*
prompt:
- ^graph_.*
resource:
- ^graph_edge_contract$

Loading
Loading