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
{{ message }}
Repository navigation
McpSchema.Tool requires the annotations attribute. #312
Better integration with the Spring ecosystem (e.g., Spring AI): Supporting this property would enable better interoperability with frameworks like Spring AI. In Spring AI, there is a returnDirect attribute for tools(https://docs.spring.io/spring-ai/reference/1.1-SNAPSHOT/api/tools.html#_return_direct), which indicates that the result of the tool call should be returned directly to the user instead of being sent back to the model. However, since McpSchema.Tool currently lacks a way to carry this attribute, returnDirect becomes ineffective in MCP scenarios(for details on this point, please refer to: @Tool returnDirect Attribute Ignored spring-projects/spring-ai#3481 (comment) ). I believe it's a good approach to pass this value through annotations.
Support and extension in other language SDKs: The annotations property is already supported in MCP SDKs for languages such as Python and Swift, and each has extended it in their own way.
Hi @tzolov thank you very much for your time, it's really great that this PR can be merged, I think when the next version is released (maybe v0.11.0?) we'll be able to integrate it in Spring AI and with the help of it solve the problem we discussed in spring-projects/spring-ai#3481 (comment)
I will keep an eye on MCP's java-sdk release, and submit a PR to Spring AI as soon as it is available! Thanks again!
Activity
tzolov commentedon Jun 24, 2025
Resolved by #313
sunyuhan1998 commentedon Jun 24, 2025
Hi @tzolov thank you very much for your time, it's really great that this PR can be merged, I think when the next version is released (maybe v0.11.0?) we'll be able to integrate it in
Spring AIand with the help of it solve the problem we discussed in spring-projects/spring-ai#3481 (comment)I will keep an eye on MCP's java-sdk release, and submit a PR to Spring AI as soon as it is available! Thanks again!