Skip to content

Resolve A2A and MCP bindings by name#1004

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

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

Conversation

@radugheo

Copy link
Copy Markdown
Collaborator
  • Resolve Unified Runtime MCP and A2A tools by display name.
  • Pass legacy slugs only as compatibility fallback hints.
  • Update MCP and A2A tool coverage.

Copilot AI review requested due to automatic review settings July 22, 2026 22:17

Copilot AI left a comment

Copy link
Copy Markdown

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 MCP and A2A tool resolution flow to use name-based lookups in the UiPath SDK (with legacy slugs passed as compatibility hints), and adjusts test coverage to match the new binding behavior.

Changes:

  • Switch MCP server resolution from retrieve_async(slug=...) to retrieve_by_name_async(name=..., legacy_slug=...).
  • Switch Remote A2A agent resolution from retrieve_async(slug=...) to retrieve_by_name_async(name=..., legacy_slug=...) and update the A2aClient interface accordingly.
  • Update MCP/A2A tests to mock and assert the new name-based SDK calls.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/agent/tools/test_mcp/test_mcp_tool.py Updates MCP tool invocation test mocks to use retrieve_by_name_async.
tests/agent/tools/test_mcp/test_mcp_client.py Updates MCP client tests to mock/assert retrieve_by_name_async arguments (name + legacy_slug + folder_path).
tests/agent/tools/test_a2a_tool.py Updates A2A tests for the new client fields and retrieve_by_name_async call shape.
src/uipath_langchain/agent/tools/mcp/mcp_client.py Changes MCP server URL resolution to use name-based retrieval with legacy slug fallback.
src/uipath_langchain/agent/tools/a2a/a2a_tool.py Changes A2A agent URL resolution to use name-based retrieval with legacy slug fallback; updates client construction accordingly.

)

a2a_client = A2aClient(agent_card, resource.slug)
a2a_client = A2aClient(agent_card, resource.name, resource.slug)
@radugheo
radugheo force-pushed the fix/a2a-mcp-resolve-by-name branch 2 times, most recently from 1e253f1 to 3fa9f00 Compare July 23, 2026 07:45
@radugheo
radugheo force-pushed the fix/a2a-mcp-resolve-by-name branch from 3fa9f00 to 0512fd6 Compare July 23, 2026 10:10
@sonarqubecloud

Copy link
Copy Markdown

Comment thread pyproject.toml
"uipath>=2.13.7, <2.14.0",
"uipath-core>=0.5.29, <0.6.0",
"uipath-platform>=0.2.12, <0.3.0",
"uipath-platform==0.2.14.dev1018287328",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Restore a production uipath-platform constraint before merging. This published dependency pins a TestPyPI development build; normal pip consumers resolve from PyPI and do not read [tool.uv.sources], so uipath-langchain==0.14.16 cannot install when this build is unavailable on PyPI.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants