-
Couldn't load subscription status.
- Fork 2.1k
Labels
mcp[Component] Issues about MCP support[Component] Issues about MCP support
Milestone
Description
Describe the bug
After upgrading to ADK v1.16, requests that stream tool outputs show a noticeable latency increase. Tracing reveals that McpToolset.get_tools() is invoked multiple times during a single streamed interaction, repeatedly reconstructing the same tool list. This results in unnecessary network/IPC work and object creation, compounding latency.
To Reproduce
Steps to reproduce the behavior:
- Install 'google-adk==1.16.*' (or build from main including v1.16 changes).
- Configure an MCP server with a stable set of tools (no dynamic changes at runtime).
- Run a streaming generation that calls MCP tools (e.g., tool-calling with partial deltas).
- Observe logs/trace: get_tools() is called several times per request; end-to-end latency increases vs. pre-1.16.
Expected behavior
- get_tools() should only resolve/build the tool list once per McpToolset instance (or per session), and reuse it when the set of available tools is unchanged.
- Streaming should not incur repeated, identical tool discovery costs.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. macOS, Linux, Windows]
- Python version(python -V):
- ADK version(pip show google-adk):
Model Information:
- Are you using LiteLLM: Yes/No
- Which model is being used(e.g. gemini-2.5-pro)
Additional context
Add any other context about the problem here.
puritatemcordis, thiagosalvatore, Thiago-AS, Maddest-Lad, raokarthik99 and 2 more
Metadata
Metadata
Assignees
Labels
mcp[Component] Issues about MCP support[Component] Issues about MCP support