Bug description I found an issue when making MCP calls, where an error occurs when the requesting controller returns Flux<> in reactive mode
java.lang.IllegalArgumentException: toolName cannot be null or empty
at org.springframework.util.Assert.hasText(Assert.java:253) ~[spring-core-6.2.3.jar:6.2.3]
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Environment java: oracle openJDK17 Spring AI: 1.0.0-M6 LM Studio: 0.3.12 Model: Qwen2.5
Steps to reproduce
cd spring-mcp-test
git checkout EmptyToolName
mvn clean package
java -jar mcp-server/target/mcp-server.jar
java -jar mcp-client/target/mcp-client.jar
curl http://localhost:8080/ai/mcp?message=Get%scurrent%sDate
# or message=List the files in the UV directory of drive D
Expected behavior Some information about files.
Minimal Complete Reproducible example Check out the project https://github.com/fxz26284407/spring-mcp-test
Comment From: dev-jonghoonpark
I tried running the example file you posted and it returns a message like this
What specific help do you need regarding listing files? Please provide more details.%
No errors occurred
I tested it with the gpt-4o-mini
model of Open AI
Comment From: fxz26284407
I tried running the example file you posted and it returns a message like this
What specific help do you need regarding listing files? Please provide more details.%
No errors occurred
I tested it with the
gpt-4o-mini
model of Open AI
Sorry, the message parameter of the URL was written incorrectly. It should be like this
curl http://localhost:8080/ai/mcp?message=Get%scurrent%sDate
# or message=List the files in the UV directory of drive D
Comment From: tzolov
@fxz26284407 I've checked out your project, updated it to latest spring-ai 1.0.0-SNAPSHOT within the EmptyToolName branch I started the server and the client apps (using gpt-4o)
Then thit the http://localhost:8080/ai/mcp?message=Get%scurrent%sDate and got
What specific directory would you like to list the files from?
No errors