Resolve A2A and MCP bindings by name#1828
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the UiPath Python SDK’s resource override/binding mechanism and selected services so MCP servers and Remote A2A agents can be resolved (and overridden) by display name, while preserving compatibility with legacy slug-keyed bindings.
Changes:
- Extend
resource_overrideto optionally try a legacy identifier key when no match is found for the primary identifier. - Update MCP and Remote A2A “retrieve spec” construction to percent-encode identifiers in path segments (supporting display names containing spaces and
/). - Add/adjust tests to cover legacy binding-key fallback and identifier encoding behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/uipath-platform/src/uipath/platform/common/_bindings.py | Adds legacy_resource_identifier support to resource_override so older binding keys can still apply. |
| packages/uipath-platform/src/uipath/platform/orchestrator/_mcp_service.py | Encodes lookup identifiers in MCP retrieve endpoints; adds retrieve_by_name sync/async APIs with legacy binding compatibility. |
| packages/uipath-platform/src/uipath/platform/agenthub/_remote_a2a_service.py | Encodes lookup identifiers in Remote A2A retrieve endpoints; adds retrieve_by_name sync/async APIs with legacy binding compatibility. |
| packages/uipath/tests/resource_overrides/test_resource_overrides.py | Adds regression coverage for legacy binding-key fallback in the decorator. |
| packages/uipath-platform/tests/services/test_remote_a2a_service.py | Updates tests for renamed _retrieve_spec argument and adds display-name encoding coverage. |
| packages/uipath-platform/tests/services/test_mcp_service.py | Adds display-name encoding coverage for MCP _retrieve_spec. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
11ba7d1 to
0d1a1f1
Compare
🚨 Heads up:
|
9318c71 to
be31ae4
Compare
radu-mocanu
left a comment
There was a problem hiding this comment.
Request changes: this changes the public MCP retrieval contract from slug to display name. Preserve backward compatibility, or use a breaking minor release and publish release notes with migration guidance. See the inline comment for the affected API and a release-note example.
be31ae4 to
473d17a
Compare
|
| def retrieve( | ||
| self, | ||
| slug: str, | ||
| name: str | None = None, |
There was a problem hiding this comment.
Preserve the old positional slug contract as well. retrieve("legacy-slug") now binds to name and queries it as a display name, so existing positional callers can fail even though slug= keyword callers work. Keep slug positional and make name keyword-only, then add a positional-slug regression test.


Development Packages
uipath-platform
uipath