8000 When adk calls the MCP tool based on nodejs, it incorrectly identifies tool names with '-' as' _ ', resulting in errors · Issue #1115 · google/adk-python · GitHub
[go: up one dir, main page]

Skip to content
When adk calls the MCP tool based on nodejs, it incorrectly identifies tool names with '-' as' _ ', resulting in errors #1115
Open
@stonyme

Description

@stonyme

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:

  1. Install 'npm install 12306-mcp'
  2. Run 'adk web'
  3. Send '明天从成都出发去贵州3日游,安排下'
  4. 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

Image
Image
Image
Image

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"] ), ), ], )

Metadata

Metadata

Assignees

Labels

toolsIssues related to tools

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0