Resolve A2A and MCP bindings by name#1828
Open
radugheo wants to merge 1 commit into
Open
Conversation
radugheo
commented
Jul 22, 2026
Collaborator
- Resolve MCP and A2A resource overrides by display name.
- Fetch resource metadata before using slug-only protocol routes.
- Preserve compatibility with legacy slug bindings.
Contributor
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.
Comment on lines
+247
to
+255
| def retrieve_by_name( | ||
| self, | ||
| name: str, | ||
| *, | ||
| legacy_slug: str | None = None, | ||
| folder_path: str | None = None, | ||
| ) -> RemoteA2aAgent: | ||
| """Retrieve a Remote A2A agent by its display name.""" | ||
| warnings.warn( |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

