Description
Describe the bug
I add a mcp tool for agent,when use a tool in this mcp, and has error like"{"error": "Function get_station_code_of_citys is not found in the tools_dict."}"。
To Reproduce
Steps to reproduce the behavior:
- Install 'npm install 12306-mcp'
- Run 'adk web'
- Send '明天从成都出发去贵州3日游,安排下'
- See error
Expected behavior
Sometimes other issues call this tool with the correct name, and then again sometimes it's the wrong one, and it seems to be the case that this error occurs when calling the tool more than once.
Screenshots
Desktop (please complete the following information):
- OS: [e.g. iOS]:mac
- Python version(python -V):3.13.3
- ADK version(pip show google-adk):1.1.1
- LLM:deepseek-chat
Code
root_agent = LlmAgent( name="travel_agent", model=model, description="You're a helpful and versatile assistant.", instruction=""" When a user asks a ticket related question, you are able to call the right tool to look up the exact information and reply to the user. """, tools=[ MCPToolset( connection_params=StdioServerParameters( encoding_error_handler="ignore", command="npx", args=["-y", "12306-mcp"] ), ), ], )