Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/uipath_mcp/_cli/_runtime/_context.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from enum import Enum
from typing import Optional

from uipath._cli._runtime._contracts import UiPathRuntimeContext
Expand All @@ -8,3 +9,10 @@
class UiPathMcpRuntimeContext(UiPathRuntimeContext):
"""Context information passed throughout the runtime execution."""
config: Optional[McpConfig] = None


class UiPathServerType(Enum):
UiPath = 0 # Processes, Agents, Activities
External = 1 # npx, uvx
Local = 2 # PackageType.MCPServer
Hosted = 3 # tunnel to externally hosted server
5 changes: 2 additions & 3 deletions src/uipath_mcp/_cli/_runtime/_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from uipath.tracing import wait_for_tracers

from .._utils._config import McpServer
from ._context import UiPathMcpRuntimeContext
from ._context import UiPathMcpRuntimeContext, UiPathServerType
from ._exception import UiPathMcpRuntimeError
from ._session import SessionServer
from ._stdio_client import stdio_client
Expand Down Expand Up @@ -313,14 +313,13 @@ async def _register(self) -> None:
"Name": self._server.name,
"Slug": self._server.name,
"Version": "1.0.0",
"Type": 1 if self.sandboxed else 3,
"Type": UiPathServerType.External.value if self.sandboxed else UiPathServerType.Hosted.value,
},
"tools": [],
}

for tool in tools_result.tools:
tool_info = {
"Type": 1,
"Name": tool.name,
"ProcessType": "Tool",
"Description": tool.description,
Expand Down