Skip to content

Resolve A2A and MCP bindings by name#1828

Open
radugheo wants to merge 1 commit into
mainfrom
fix/a2a-mcp-resolve-by-name
Open

Resolve A2A and MCP bindings by name#1828
radugheo wants to merge 1 commit into
mainfrom
fix/a2a-mcp-resolve-by-name

Conversation

@radugheo

Copy link
Copy Markdown
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.

Copilot AI review requested due to automatic review settings July 22, 2026 22:17
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels Jul 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_override to 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(
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
27.3% Coverage on New Code (required ≥ 90%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants