File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/uipath_mcp/_cli/_runtime Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 11import asyncio
2+ import json
23import logging
34import os
45import sys
78import uuid
89from typing import Any , Dict , Optional
910
11+ from httpx import HTTPStatusError
1012from mcp import ClientSession , StdioServerParameters , stdio_client
1113from mcp .types import JSONRPCResponse
1214from opentelemetry import trace
@@ -392,11 +394,12 @@ async def _register(self) -> None:
392394 "Name" : tool .name ,
393395 "ProcessType" : "Tool" ,
394396 "Description" : tool .description ,
397+ "InputSchema" : json .dumps (tool .inputSchema )
398+ if tool .inputSchema
399+ else "{}" ,
395400 }
396401 client_info ["tools" ].append (tool_info )
397402
398- logger .info (client_info )
399-
400403 # Register with UiPath MCP Server
401404 await self ._uipath .api_client .request_async (
402405 "POST" ,
@@ -407,8 +410,10 @@ async def _register(self) -> None:
407410 logger .info ("Registered MCP Server type successfully" )
408411 except Exception as e :
409412 logger .error (f"Error during registration: { e } " )
410- if e .status_code == 400 :
411- logger .error (f"Error details: { e .response .text } " )
413+ if isinstance (e , HTTPStatusError ):
414+ logger .error (
415+ f"HTTP error details: { e .response .text } status code: { e .response .status_code } "
416+ )
412417
413418 raise UiPathMcpRuntimeError (
414419 "REGISTRATION_ERROR" ,
You can’t perform that action at this time.
0 commit comments