You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the Tool Limitations documentation states that asynchronous and reactive types such as CompletableFuture, Future, Mono, and Flux are not supported as parameters or return types for MCP tool methods.
This makes sense for synchronous servers, but when using the ASYNC MCP Server type, tool implementors often rely on reactive stacks such as R2DBC, WebClient, or other non-blocking APIs. At the moment, the workaround is to block() reactive pipelines inside the tool method and return a synchronous type, but this loses the benefits of end-to-end reactive programming and requires additional care (e.g. subscribeOn(boundedElastic())) to avoid blocking the event loop.
Question:
• Is there anything currently planned on the roadmap to allow MCP tools to directly expose Mono or Flux signatures?
This feature would be very helpful for anyone using Spring AI MCP Server + R2DBC / WebFlux in order to stay non-blocking throughout.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Currently the Tool Limitations documentation states that asynchronous and reactive types such as CompletableFuture, Future, Mono, and Flux are not supported as parameters or return types for MCP tool methods.
This makes sense for synchronous servers, but when using the ASYNC MCP Server type, tool implementors often rely on reactive stacks such as R2DBC, WebClient, or other non-blocking APIs. At the moment, the workaround is to block() reactive pipelines inside the tool method and return a synchronous type, but this loses the benefits of end-to-end reactive programming and requires additional care (e.g. subscribeOn(boundedElastic())) to avoid blocking the event loop.
Question:
• Is there anything currently planned on the roadmap to allow MCP tools to directly expose Mono or Flux signatures?
This feature would be very helpful for anyone using Spring AI MCP Server + R2DBC / WebFlux in order to stay non-blocking throughout.
Beta Was this translation helpful? Give feedback.
All reactions