fix(mcp): qualify MCP tool names by the resource that owns them - #1106
Merged
Merged
Conversation
radugheo
force-pushed
the
fix/mcp-tool-name-namespacing
branch
4 times, most recently
from
September 21, 2026 17:07
b6b5add to
8cffc5e
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Sanitized MCP names can bypass TOOL-scope guardrails, and duplicate-name remediation is inaccurate for generic tools.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (2)
Resolved since last review (2)
radugheo
force-pushed
the
fix/mcp-tool-name-namespacing
branch
from
September 22, 2026 10:00
8cffc5e to
99fe391
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Qualified MCP names can bypass guardrail matching for names that require sanitization or truncation.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Resolved since last review (2)
ionmincu
approved these changes
Sep 22, 2026
radugheo
force-pushed
the
fix/mcp-tool-name-namespacing
branch
from
September 22, 2026 14:50
99fe391 to
a63125f
Compare
MCP scopes tool names per server. The Unified Runtime put the raw tool name
into the one flat tool list it hands the model, so two connected MCP servers
exposing the same tool name produced two identically named tools: the provider
rejected the request as a duplicate definition before any LLM call, and the
graph's tool-node map -- keyed by that name -- would have kept only the last
one and routed both servers' calls to it.
The name is now mcp-{resource}-tool-{tool}, matching the format the Temporal
runtime has always used, so traces and eval assertions read the same on either
runtime. Resource names are unique within an agent definition, so the pair is
unique by construction; a pair past the provider's 64-character cap is
truncated and carries a digest of the full pair.
create_tool_node now refuses a duplicate name instead of silently overwriting,
naming both tools and the resources they came from. Since #1072 the provider's
own 400 no longer relays its message, so a collision from any other source
(A2A cards, sanitization) would otherwise surface only as a generic rejection.
Alternatives considered: qualifying only on collision, which would make a
tool's identity depend on which other servers happen to be attached, so adding
a second server would silently rename the first server's tools.
PRODEV-1599
radugheo
force-pushed
the
fix/mcp-tool-name-namespacing
branch
from
September 22, 2026 14:57
a63125f to
41b4c82
Compare
|
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.






mcp-{resource}-tool-{tool}, built bymcp_tool_identity(), matching the format the Temporal runtime uses. Resource names are unique within an agent definition, so the pair is unique by construction.create_tool_noderaisesAgentStartupError(INVALID_TOOL_CONFIG)on a duplicate tool name instead of silently keeping the last tool and routing both tools' calls to it. The message names both tools and the resources they came from.call_toolstill uses the raw MCP name, andmetadata["display_name"]still carries it for span titles.Behaviour change: every MCP tool gets a new LLM-facing name, not only colliding ones. Eval sets asserting the old names need updating, which they do not today.
Needs a release before UiPath/uipath-agents-python#763 can bump its pin and merge.
PRODEV-1599