
Multiple tools error encountered in ADK multi-agent configuration and solutions
This page has been translated by machine translation. View original
Introduction
While building an agent application using Google ADK (Agent Development Kit), I encountered the following error:
400 INVALID_ARGUMENT: Multiple tools are supported only when they are all search tools.
This article will organize the process from investigating the cause of this error to reaching a solution.
Testing environment: ADK v1.28.0, via Vertex AI, Python 3.13
Mixed Tools in a Single Agent
Initially, I was trying to create a structure that combined a custom function (Function Calling) and Google Search in a single agent.
from google.adk.agents import Agent
from google.adk.tools import google_search
agent = Agent(
model="gemini-2.5-flash",
name="assistant",
instruction="...",
tools=[
search_knowledge_base, # Custom Python function
google_search, # Gemini built-in tool
],
)
However, when I ran this, the following error was returned:
400 INVALID_ARGUMENT. {'error': {'code': 400, 'message': 'Multiple tools are supported only when they are all search tools.', 'status': 'INVALID_ARGUMENT'}}
Cause
Upon investigation, it appears that Gemini 2.x series models have a constraint where only one type of tool can be included in a single API request. The tools provided by ADK can be broadly categorized as follows:
| Type | ADK Interface |
|---|---|
| Custom Functions (Function Calling) | Python functions, FunctionTool, subclasses of BaseTool |
| Google Search | google_search |
| Vertex AI Search | VertexAiSearchTool |
| Code Execution | code_execution |
| URL Context | url_context |
| Google Maps | google_maps_grounding |
All tools except custom functions are treated as Gemini built-in tools. The constraint is that you cannot include both custom functions and built-in tools in a single API request. This is a constraint of the Gemini API (model), not of the ADK.
Attempting to Workaround with sub_agents Configuration
Thinking that separating tool types might solve the issue, I changed to a sub_agents configuration where each sub-agent only has one type of tool.
search_agent = Agent(
model="gemini-2.5-flash",
name="search_agent",
description="Agent that searches organization-specific knowledge base",
instruction="...",
tools=[search_knowledge_base], # FunctionDeclaration only
)
web_agent = Agent(
model="gemini-2.5-flash",
name="web_agent",
description="Agent that retrieves general information via Google Search",
instruction="...",
tools=[google_search], # Built-in tool only
)
root_agent = Agent(
model="gemini-2.5-flash",
name="root_agent",
instruction="Delegate to appropriate sub-agent based on user question",
sub_agents=[search_agent, web_agent],
)
I thought this would work, but the same 400 INVALID_ARGUMENT error occurred with this configuration as well.
Related Issues
This problem has been reported and discussed as issues:
The issues suggest workarounds such as wrapping with AgentTool or replacing built-in tools with custom functions. However, reports indicate that results vary depending on ADK version and configuration, and these solutions didn't work in my environment.
Resolution with Gemini 3
Meanwhile, I discovered that the Gemini 3 model now supports the Tool Combination feature (preview).
This allows combined use of built-in tools and custom functions within the same request.
Verification Results
Curious if this would actually work, I changed the model to gemini-3-flash-preview and tested four configurations:
| # | Configuration | Model | Result |
|---|---|---|---|
| 1 | Mixed tools in single agent | gemini-2.5-flash | Error |
| 2 | sub_agents structure (separated tools) | gemini-2.5-flash | Error |
| 3 | Mixed tools in single agent | gemini-3-flash-preview | Success |
| 4 | sub_agents structure (separated tools) | gemini-3-flash-preview | Success |
With Gemini 3, it seems we no longer need to worry about tool type constraints in either single agent or sub-agent configurations.
Summary
In Gemini 2.x series, mixing built-in tools and custom functions causes a 400 INVALID_ARGUMENT error. This couldn't be avoided even by separating tools with sub_agents, which was quite a challenging constraint.
With Gemini 3's Tool Combination feature (preview), this constraint has been resolved. I've confirmed it works properly in both single agent and sub-agent configurations, so I hope this will be helpful for others facing the same error.

