From 5dea6c2600154ea847e65dd3a6afa1a1d2b46076 Mon Sep 17 00:00:00 2001 From: Carlos Barbero Date: Tue, 27 Jan 2026 12:06:24 -0300 Subject: [PATCH] Fix inspection.py import logic and update docs --- mcp-server/src/inspection.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mcp-server/src/inspection.py b/mcp-server/src/inspection.py index 356c2847..222029f4 100644 --- a/mcp-server/src/inspection.py +++ b/mcp-server/src/inspection.py @@ -62,6 +62,11 @@ def get_all_nodes(): # Verify it belongs to this module (to avoid re-export noise) # or at least is defined in the diagrams package if obj.__module__.startswith("diagrams"): + # Ensure the object actually belongs to this service (or a submodule of it) + # This prevents listing imported classes from other services (e.g. Trace in operations vs devtools) + if not obj.__module__.startswith(service_name): + continue + icons[short_provider][short_service].append(name) node_registry[name] = obj