diff --git a/apps/onboarding/mcp.py b/apps/onboarding/mcp.py index 6115c76..26734b0 100644 --- a/apps/onboarding/mcp.py +++ b/apps/onboarding/mcp.py @@ -10,14 +10,15 @@ from apps.knowledge.models import RoleRagDocument from apps.onboarding.models import OnboardingSession logger = logging.getLogger(__name__) +mcp_meta_value = 'mcp_tool_meta' def mcp_tool(name, description, input_schema): def decorator(func): - func._mcp_tool_meta = { + setattr(func, mcp_meta_value, { 'name': name, 'description': description, 'inputSchema': input_schema, - } + }) return func return decorator @@ -26,7 +27,7 @@ def mcp_tool(name, description, input_schema): def _collect_tools(class_namespace): tools = [] for method_name, value in class_namespace.items(): - metadata = getattr(value, '_mcp_tool_meta', None) + metadata = getattr(value, mcp_meta_value, None) if not metadata: continue diff --git a/site/src/App.vue b/site/src/App.vue index 8418366..bd3d563 100644 --- a/site/src/App.vue +++ b/site/src/App.vue @@ -106,6 +106,14 @@ const user = userStore