Skip to content

Commit 46b3a72

Browse files
author
Valentina Bojan
committed
Merge remote-tracking branch 'origin/main' into valentinabojan/guardrails-source-job-headers
2 parents 9ea89e5 + 8cfb822 commit 46b3a72

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

packages/uipath-platform/src/uipath/platform/orchestrator/mcp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class McpServerType(IntEnum):
1818
Remote = 4 # HTTP connection to remote MCP server
1919
ProcessAssistant = 5 # Dynamic user process assistant
2020
Platform = 6 # Platform MCP server (e.g: Orchestrator, TestManager)
21+
Swagger = 7 # User-provided Swagger/OpenAPI spec exposed as MCP server
2122

2223

2324
class McpServerStatus(IntEnum):

packages/uipath-platform/tests/services/test_mcp_service.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,3 +551,21 @@ async def test_retrieve_async_passes_all_kwargs(
551551
call_kwargs.kwargs["headers"][HEADER_FOLDER_KEY]
552552
== "test-folder-key"
553553
)
554+
555+
556+
class TestMcpServerType:
557+
"""Tests for the McpServerType enum and McpServer validation."""
558+
559+
def test_swagger_type_value(self) -> None:
560+
from uipath.platform.orchestrator.mcp import McpServerType
561+
562+
assert McpServerType.Swagger == 7
563+
564+
def test_validate_swagger_server(self) -> None:
565+
"""A Swagger (type=7) server must validate — regression for backend
566+
server types newer than the SDK's enum."""
567+
server = McpServer.model_validate(
568+
{"slug": "contoso-directory", "name": "Employee Directory", "type": 7}
569+
)
570+
assert server.type == 7
571+
assert server.slug == "contoso-directory"

0 commit comments

Comments
 (0)