Merge branch 'feat/mcp' into deploy/dev

pull/22036/head
Novice 11 months ago
commit b814f16ecd

@ -733,7 +733,7 @@ class ToolMCPDetailApi(Resource):
def get(self, provider_id): def get(self, provider_id):
user = current_user user = current_user
provider = MCPToolManageService.get_mcp_provider_by_provider_id(provider_id, user.current_tenant_id) provider = MCPToolManageService.get_mcp_provider_by_provider_id(provider_id, user.current_tenant_id)
return jsonable_encoder(ToolTransformService.mcp_provider_to_user_provider(provider)) return jsonable_encoder(ToolTransformService.mcp_provider_to_user_provider(provider, for_list=True))
class ToolMCPListAllApi(Resource): class ToolMCPListAllApi(Resource):

@ -93,7 +93,7 @@ class MCPToolManageService:
) )
db.session.add(mcp_tool) db.session.add(mcp_tool)
db.session.commit() db.session.commit()
return ToolTransformService.mcp_provider_to_user_provider(mcp_tool) return ToolTransformService.mcp_provider_to_user_provider(mcp_tool, for_list=True)
@staticmethod @staticmethod
def retrieve_mcp_tools(tenant_id: str, for_list: bool = False) -> list[ToolProviderApiEntity]: def retrieve_mcp_tools(tenant_id: str, for_list: bool = False) -> list[ToolProviderApiEntity]:

Loading…
Cancel
Save