Skip to content

Bug: Sub-agent routing succeeds but execution fails when delegated agent uses GoogleSearchTool #4449

@vishvas-chauhan

Description

@vishvas-chauhan

🔴 Required Information

Describe the Bug:

When using Google ADK multi-agent routing where a root router agent delegates to a specialist sub-agent, routing works correctly (transfer_to_agent is emitted), but execution fails when the selected sub-agent uses GoogleSearchTool.

This occurs when another sub-agent uses custom/MCP tools. The failure appears related to tool compatibility validation between heterogeneous tool types (custom/MCP tools vs built-in Google search).

I would like to confirm whether this scenario is expected to work or if it is a known limitation of the framework.


Steps to Reproduce:

  1. Install ADK
pip install google-adk
  1. Run toolbox server providing MCP tools
./toolbox --tools-file tools.yml --port 5000
  1. Define agents
from google.adk.agents import LlmAgent, Agent
from google.adk.tools.google_search_tool import GoogleSearchTool
from toolbox_sync import ToolboxSyncClient

_toolset = None

def _load_tools():
    global _toolset
    if _toolset is None:
        client = ToolboxSyncClient("http://127.0.0.1:5000")
        _toolset = client.load_toolset("rm-demo-toolset")
    return _toolset

rm_agent = LlmAgent(
    name="rm_agent",
    model="gemini-2.5-flash",
    tools=_load_tools(),
    instruction="Handle customer queries"
)

etf_agent_2 = LlmAgent(
    name="etf_agent_2",
    model="gemini-2.5-flash",
    tools=[GoogleSearchTool()],
    instruction="Answer ETF questions using web search"
)

router_root_agent = Agent(
    name="root_router",
    model="gemini-2.5-flash",
    sub_agents=[rm_agent, etf_agent_2],
    instruction="""
Route queries:
- Customers → rm_agent
- ETFs → etf_agent_2
Call only one agent.
"""
)
  1. Execute runner with ETF query
tell me about this etf VanEck Gold Miners UCITS ETF
  1. Observe failure

Expected Behavior:

  • Router selects etf_agent_2
  • ETF agent executes normally
  • Google search tool runs
  • Final response returned

Observed Behavior:

Routing succeeds:

Tool Call: transfer_to_agent {'agent_name': 'etf_agent_2'}
Tool Result: {'result': None}

Execution fails:

400 INVALID_ARGUMENT
Multiple tools are supported only when they are all search tools.

Environment Details:

  • ADK Library Version (pip show google-adk): 1.24.0
  • Desktop OS: Linux (Google Colab)
    Kernel: Linux 4c63b968cc70 6.6.105+ x86_64
  • Python Version (python -V): 3.12.12

Model Information:

  • Are you using LiteLLM: No
  • Which model is being used: gemini-2.5-flash

🟡 Optional Information

Regression:

Not tested on earlier versions.


Logs:

Tool Call: transfer_to_agent {'agent_name': 'etf_agent_2'}
Tool Result: {'result': None}

Sub-agent error:
<class 'google.genai.errors.ClientError'>
400 INVALID_ARGUMENT
Multiple tools are supported only when they are all search tools.

Screenshots / Video:

N/A


Additional Context:

This scenario works when both agents are executed using ParallelAgent, but that executes unnecessary agents.
The issue occurs specifically when hierarchical routing (sub_agents) is used and execution is delegated to a sub-agent that uses GoogleSearchTool.


Minimal Reproduction Code:

(Provided above in Steps to Reproduce)


How often has this issue occurred?:

  • Always (100%)

Metadata

Metadata

Assignees

Labels

core[Component] This issue is related to the core interface and implementation

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions