-
Notifications
You must be signed in to change notification settings - Fork 564
standard tool annotation classes #270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
to address feature request: modelcontextprotocol#224
annotation classes. Added ToolResult, ToolAnnotation, and ToolAnnotations annotations. Added ToolGroupService interface and supporting tools.utils.*Description classes, to allow runtime querying of an service interface class' ToolDescriptions (one for each method with Tool annotation at runtime).
@tool, @ToolParam, @ToolResult, @ToolAnnotations along with description (record) classes...e.g. ToolDescription for communicating the meta-data across processes in a consistent way.
Hi @scottslewis, Have you tried the https://github.com/spring-ai-community/mcp-annotations project? It provides annotation-based method handling for MCP servers in Java, built on the MCP Java SDK. Current annotations:
Here is a related example The core Goal: Graduate If you're interested in contributing, I'd recommend focusing on the mcp-annotation project. Until then, it's managed and released to Maven Central under its current project. |
See issue #224
New annotation classes for @tool, @ToolParam, @ToolAnnotations, @ToolResult annotations.
Motivation and Context
Currently, each framework vendor (e.g. Spring, others) is defining it's own Java annotation classes, which binds (by package namespace) these annotations to a specific framework. Including these as part of the java mcp sdk will allow developers to use any framework rather than bind these classes to a specific framework.
How Has This Been Tested?
Have tested here: https://github.com/ECF/Py4j-RemoteServicesProvider/blob/master/examples/org.eclipse.ecf.examples.ai.mcp.toolservice/src/org/eclipse/ecf/examples/ai/mcp/toolservice/ArithmeticTools.java
If accepted, I will contribute automated tests. The existing annotation and *Description classes have been tested.
Breaking Changes
Only breaking changes will be for developers that are using the framework-specific annotations currently.
Yes as per above.
Types of changes
Checklist