Skip to content

Please fix the issue where duplicate tool names in multiple MCP tools cause the agent list to hang #1167

@fadeoreo

Description

@fadeoreo

Please fix the issue where duplicate tool names in multiple MCP tools cause the agent list to hang

Problem Description:
When two MCP servers have tools with the same internal tool name, running agent list MCP: list tools from server xxxx will hang, and after the tool list is (supposedly) returned, the agent cannot work properly. During troubleshooting, issues such as network, protocol, registration, or async problems were suspected, but the real cause was that one of the MCP tools had a conflicting tool name, making it impossible for the agent SDK to distinguish between tools from different servers.

Steps to Reproduce:

  1. Deploy two MCP servers, each containing a tool with the same name.
  2. Run the agent SDK as usual until executing agent list MCP: list tools from server xxxx.
  3. Observe that the program hangs and does not return as expected.

Expected Behavior:
Even if different MCP servers have tools with the same name, all tools should be correctly distinguished and listed.

Suggested Fix:
It is recommended to prefix the tool name with the MCP server name (e.g., serverA:run, serverB:run) to ensure global uniqueness and avoid conflicts.

Troubleshooting Process:

  • Checked network, registration, protocol, and agent SDK code, but found no issues.
  • Ultimately identified that the problem was caused by tool name conflicts, which led to abnormal behavior in the agent SDK.

Note for Developers:
If you encounter the agent list hanging, please first check whether the tool names are unique!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions