From 7280874c7878db3440ea27b562217276ca5ce948 Mon Sep 17 00:00:00 2001 From: caochenlei Date: Fri, 7 Nov 2025 16:00:40 +0800 Subject: [PATCH] fix: tool schema team_id not effective(#1395) Signed-off-by: caochenlei --- mcpgateway/services/tool_service.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mcpgateway/services/tool_service.py b/mcpgateway/services/tool_service.py index a76413715..73f7dac63 100644 --- a/mcpgateway/services/tool_service.py +++ b/mcpgateway/services/tool_service.py @@ -672,10 +672,10 @@ async def register_tool( import_batch_id=import_batch_id, federation_source=federation_source, version=1, - # Team scoping fields - team_id=team_id, - owner_email=owner_email or created_by, - visibility=visibility, + # Team scoping fields - use schema values if provided, otherwise fallback to parameters + team_id=getattr(tool, "team_id", None) or team_id, + owner_email=getattr(tool, "owner_email", None) or owner_email or created_by, + visibility=getattr(tool, "visibility", None) or visibility, # passthrough REST tools fields base_url=tool.base_url if tool.integration_type == "REST" else None, path_template=tool.path_template if tool.integration_type == "REST" else None,