-
Notifications
You must be signed in to change notification settings - Fork 6
Description
The following enhacements are suggested:
- When declaring a tool method, there should be a way to mark a param as required. For example,
@Mcp.Tool("Adds a new event to the calendar")
List<McpToolContent> addCalendarEvent(McpFeatures features,
String name, // @Required?
String date, // @Required?
List<String> attendees) {
By default all params are optional. The @Required annotation (or equivalent) should be used to generated the correct JSON schema for the tool.
-
When binding template parameters, we currently use the method parameter name for binding. We should offer an alternative using an anntotation just like JAX-RS'
@PathParam. We can still use our current approach by default. -
When binding completions, we should provide a way to bind both the
nameand thevalue(what the user has typed so far). We currently only provide the value. Some completions may use the value others may not. The workaround now is to inject theMcpParametersand grab the name from there. Note that prompts typically have multiple fields that can be completed, so if the same completion method is used, it's important to get the name of the field being completed.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status