-
Notifications
You must be signed in to change notification settings - Fork 28
feat: Add _meta to tool/prompt/resource declaration #83
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
18f07b9 to
1ae76f8
Compare
Append the ability to define "_meta" property in tool, prompt, resource declarations Usage: ``` @mcptool(metaProvider = MyMetaProvider.class) String myTool() { } class MyMetaProvider implements MetaProvider { return Map.of( "openai/widgetPrefersBorder", true, "openai/widgetDomain", 'https://chatgpt.com', "openai/widgetCSP", new WidgetCsp()); } ``` Signed-off-by: Vadzim Shurmialiou <vadzim.shurmialiou@check24.de>
|
Hi @tzolov |
|
Hi everyone, is this "community" project alive? It has been nearly three weeks since the PR was opened, but there hasn’t been any reaction from maintainers - no comments, no reviews, no even an emoji. This lack of activity seems weird for a Spring project... |
I have PR spring-projects/spring-ai#3666 with almost half year of inactivity ... but with some reaction, but only after about 3 months ... |
|
In version 1.1.2, it supports defining at least some annotations. |
|
For all information: There are active discussions around moving the MCP - specified annotation types in this package to the mcp-java-sdk modelcontextprotocol/java-sdk#491 and this would likely mean a new package in the mcp-java-sdk package namespace (e.g.io.modelcontextprotocol.annotation or io.modelcontextprotocol.spec.annotation, etc). A main reason for such a move of annotation classes from mcp-annotation to mcp-java-sdk is that the annotations are completely specified by the MCP protocol spec...which defines the specific meta-data that the tooling can provide...e.g. @mcptool fields correspond to the specification schema of Tool properties....i.e. description, title, name, annotation If there is consensus in this and the mcp-java-sdk projects around a move/refactor of annotation classes from mcp-annotations to new io.modelcontextprotocol.annotation package, I will produce a pull request to the mcp-java-sdk project that adds all the annotation types currently defined in mcp-annotations. If there is consensus around the solution provided above (MetaProvider) it could be added as part of this refactor. |
Append the ability to define "_meta" property in tool, prompt, resource declarations
Usage:
Issue: #81