public static class McpServerFeatures.SyncPromptSpecification
extends java.lang.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
.构造器和说明 |
---|
SyncPromptSpecification() |