Description
When two (or more) AgentCore Gateways are attached to a single agent, every gateway exposes the built-in semantic search tool x_amz_bedrock_agentcore_search (and may also share target tool names). The vended agent templates wire one MCP client/toolset/server per gateway into a single agent, so the identical tool names collide. The symptom differs per framework:
| Framework |
Behavior with 2 gateways |
| Strands |
ValueError: Tool name 'x_amz_bedrock_agentcore_search' already exists. Cannot register tools with exact same name. at agent construction (hard crash) |
| OpenAIAgents |
UserError: Duplicate tool names found across MCP servers |
| GoogleADK |
last-wins dispatch shadow + duplicate FunctionDeclaration → Gemini 400 |
| LangChain / LangGraph |
silent last-wins — one gateway's tool becomes unreachable |
Affects the four HTTP templates that iterate gatewayProviders: strands, googleadk, langchain_langgraph, openaiagents.
Steps to Reproduce
agentcore create --project-name demo --no-agent
agentcore add gateway --name gw1 --authorizer-type NONE
agentcore add gateway --name gw2 --authorizer-type NONE
agentcore add gateway-target --gateway gw1 --name a --type mcp-server --endpoint https://mcp.exa.ai/mcp
agentcore add gateway-target --gateway gw2 --name b --type mcp-server --endpoint https://mcp.deepwiki.com/mcp
agentcore add agent --name demo --framework Strands --model-provider Bedrock --memory none
agentcore deploy -y && agentcore invoke "hi"
Both gateways have semantic search enabled (the default), so each exposes x_amz_bedrock_agentcore_search.
Expected Behavior
The agent constructs successfully and can call tools from all attached gateways. Each gateway's tools are addressable and distinct.
Actual Behavior
The agent fails to construct (Strands/OpenAIAgents raise on the duplicate tool name), or silently drops one gateway's duplicate-named tool (GoogleADK/LangChain), so the second gateway's search tool is unreachable.
CLI Version
main (0.19.0)
Operating System
Linux
Additional Context
Each SDK ships a first-class namespacing primitive (Strands MCPClient(prefix=), GoogleADK MCPToolset(tool_name_prefix=), LangChain MultiServerMCPClient(..., tool_name_prefix=True), OpenAIAgents Agent(mcp_config={"include_server_in_tool_names": True})); the templates simply weren't using them. Fixed in #1518.
Description
When two (or more) AgentCore Gateways are attached to a single agent, every gateway exposes the built-in semantic search tool
x_amz_bedrock_agentcore_search(and may also share target tool names). The vended agent templates wire one MCP client/toolset/server per gateway into a single agent, so the identical tool names collide. The symptom differs per framework:ValueError: Tool name 'x_amz_bedrock_agentcore_search' already exists. Cannot register tools with exact same name.at agent construction (hard crash)UserError: Duplicate tool names found across MCP serversFunctionDeclaration→ Gemini 400Affects the four HTTP templates that iterate
gatewayProviders:strands,googleadk,langchain_langgraph,openaiagents.Steps to Reproduce
agentcore create --project-name demo --no-agentagentcore add gateway --name gw1 --authorizer-type NONEagentcore add gateway --name gw2 --authorizer-type NONEagentcore add gateway-target --gateway gw1 --name a --type mcp-server --endpoint https://mcp.exa.ai/mcpagentcore add gateway-target --gateway gw2 --name b --type mcp-server --endpoint https://mcp.deepwiki.com/mcpagentcore add agent --name demo --framework Strands --model-provider Bedrock --memory noneagentcore deploy -y && agentcore invoke "hi"Both gateways have semantic search enabled (the default), so each exposes
x_amz_bedrock_agentcore_search.Expected Behavior
The agent constructs successfully and can call tools from all attached gateways. Each gateway's tools are addressable and distinct.
Actual Behavior
The agent fails to construct (Strands/OpenAIAgents raise on the duplicate tool name), or silently drops one gateway's duplicate-named tool (GoogleADK/LangChain), so the second gateway's search tool is unreachable.
CLI Version
main (0.19.0)
Operating System
Linux
Additional Context
Each SDK ships a first-class namespacing primitive (Strands
MCPClient(prefix=), GoogleADKMCPToolset(tool_name_prefix=), LangChainMultiServerMCPClient(..., tool_name_prefix=True), OpenAIAgentsAgent(mcp_config={"include_server_in_tool_names": True})); the templates simply weren't using them. Fixed in #1518.