Skip to content

Commit 8c18242

Browse files
authored
Merge pull request #53 from UiPath/feature/add_mcp_properties_fps
chore: add fps context properties for mcp
2 parents 48aa3b3 + 321e92f commit 8c18242

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-runtime"
3-
version = "0.2.7"
3+
version = "0.2.8"
44
description = "Runtime abstractions and interfaces for building agents and automation scripts in the UiPath ecosystem"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

src/uipath/runtime/context.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ class UiPathRuntimeContext(BaseModel):
3434
conversation_id: str | None = None
3535
exchange_id: str | None = None
3636
message_id: str | None = None
37+
mcp_server_id: str | None = None
38+
mcp_server_slug: str | None = None
3739
tenant_id: str | None = None
3840
org_id: str | None = None
3941
folder_key: str | None = None
@@ -320,6 +322,8 @@ def from_config(
320322
"conversationalService.conversationId": "conversation_id",
321323
"conversationalService.exchangeId": "exchange_id",
322324
"conversationalService.messageId": "message_id",
325+
"mcpServer.id": "mcp_server_id",
326+
"mcpServer.slug": "mcp_server_slug",
323327
}
324328

325329
attributes_set = set()

tests/test_context.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ def test_from_config_extracts_fps_properties_without_runtime(tmp_path: Path) ->
182182
"conversationalService.conversationId": "conv-123",
183183
"conversationalService.exchangeId": "ex-456",
184184
"conversationalService.messageId": "msg-789",
185+
"mcpServer.id": "server-id-123",
186+
"mcpServer.slug": "my-mcp-server",
185187
}
186188
}
187189
config_path = tmp_path / "uipath.json"
@@ -192,6 +194,8 @@ def test_from_config_extracts_fps_properties_without_runtime(tmp_path: Path) ->
192194
assert ctx.conversation_id == "conv-123"
193195
assert ctx.exchange_id == "ex-456"
194196
assert ctx.message_id == "msg-789"
197+
assert ctx.mcp_server_id == "server-id-123"
198+
assert ctx.mcp_server_slug == "my-mcp-server"
195199

196200

197201
def test_from_config_loads_runtime_and_fps_properties(tmp_path: Path) -> None:
@@ -207,6 +211,8 @@ def test_from_config_loads_runtime_and_fps_properties(tmp_path: Path) -> None:
207211
"conversationalService.conversationId": "conv-abc",
208212
"conversationalService.exchangeId": "ex-def",
209213
"conversationalService.messageId": "msg-ghi",
214+
"mcpServer.id": "mcp-server-456",
215+
"mcpServer.slug": "test-server-slug",
210216
},
211217
}
212218
config_path = tmp_path / "uipath.json"
@@ -226,3 +232,5 @@ def test_from_config_loads_runtime_and_fps_properties(tmp_path: Path) -> None:
226232
assert ctx.conversation_id == "conv-abc"
227233
assert ctx.exchange_id == "ex-def"
228234
assert ctx.message_id == "msg-ghi"
235+
assert ctx.mcp_server_id == "mcp-server-456"
236+
assert ctx.mcp_server_slug == "test-server-slug"

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)