@@ -297,6 +297,7 @@ async def _register(self) -> None:
297297
298298 # If we got here, initialization was successful and we have the tools
299299 # Now continue with registration
300+ logger .info ("Registering server runtime ..." )
300301 try :
301302 client_info = {
302303 "server" : {
@@ -318,7 +319,8 @@ async def _register(self) -> None:
318319 client_info ["tools" ].append (tool_info )
319320
320321 # Register with UiPath MCP Server
321- self ._uipath .api_client .request (
322+ logger .info (f"Starting register request mcp_/mcp/{ self ._server .name } /runtime/start?runtimeId={ self ._runtime_id } ..." )
323+ await self ._uipath .api_client .request_async (
322324 "POST" ,
323325 f"mcp_/mcp/{ self ._server .name } /runtime/start?runtimeId={ self ._runtime_id } " ,
324326 json = client_info ,
@@ -339,7 +341,7 @@ async def _on_session_start_error(self, session_id: str) -> None:
339341 Sanboxed runtimes are triggered by new client connections.
340342 """
341343 try :
342- response = self ._uipath .api_client .request (
344+ response = await self ._uipath .api_client .request_async (
343345 "POST" ,
344346 f"mcp_/mcp/{ self ._server .name } /out/message?sessionId={ session_id } " ,
345347 json = types .JSONRPCResponse (
@@ -370,7 +372,7 @@ async def _on_runtime_abort(self) -> None:
370372 Sends a runtime abort signalr to terminate all connected sessions.
371373 """
372374 try :
373- response = self ._uipath .api_client .request (
375+ response = await self ._uipath .api_client .request_async (
374376 "POST" ,
375377 f"mcp_/mcp/{ self ._server .name } /runtime/abort?runtimeId={ self ._runtime_id } "
376378 )
0 commit comments