spring-projects / spring-projects/spring-ai

Multiple tools with the same name

Open
#2,932 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
1d 7h
Merged PRs (30d)
6

Description

使用spring-ai-mcp-client-webflux-spring-boot-starter-1.0.0.M6 maven依赖,创建mcp client启动时报错:Multiple tools with the same name,
即使tools名称未冲突也会报错。

查看源码:
spring-ai-mcp-client-spring-boot-autoconfigure-1.0.0-M6.jar 中
SseHttpClientTransportAutoConfiguration

Image

@ConditionalOnMissingClass("io.modelcontextprotocol.client.transport.public class WebFluxSseClientTransport")
类路径写错了,导致SseHttpClientTransportAutoConfiguration和SseWebFluxTransportAutoConfiguration都会注入
List NamedClientMcpTransport
导致生成两个相同的mcpClients所有tool都会有一份一样的,然后校验tool的时候就会报错。

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with SseHttpClientTransportAutoConfiguration in spring-ai-mcp-client-spring-boot-autoconfigure and compare its conditional class name with SseWebFluxTransportAutoConfiguration. Reproduce startup with the spring-ai-mcp-client-webflux-spring-boot-starter-1.0.0.M6 dependency and verify that only one NamedClientMcpTransport is injected and the duplicate-tool error is gone.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.