public static class McpServerFeatures.SyncPromptSpecification extends Object
Example prompt specification:
new McpServerFeatures.SyncPromptSpecification(
new Prompt("analyze", "Code analysis template"),
(exchange, request) -> {
String code = request.getArguments().get("code");
return new GetPromptResult(
"Analyze this code:\n\n" + code + "\n\nProvide feedback on:");
})
McpSyncServerExchange upon which the server can interact with the connected
client. The second arguments is a
McpSchema.GetPromptRequest.Copyright © 2025. All rights reserved.