Refactor: Simplify ServerCapabilities builder API for completions
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
This commit is contained in:
parent
7853efefda
commit
734d1732d6
2 changed files with 3 additions and 3 deletions
|
|
@ -774,7 +774,7 @@ class WebFluxSseIntegrationTests {
|
||||||
};
|
};
|
||||||
|
|
||||||
var mcpServer = McpServer.sync(mcpServerTransportProvider)
|
var mcpServer = McpServer.sync(mcpServerTransportProvider)
|
||||||
.capabilities(ServerCapabilities.builder().completions(new CompletionCapabilities()).build())
|
.capabilities(ServerCapabilities.builder().completions().build())
|
||||||
.prompts(new McpServerFeatures.SyncPromptSpecification(
|
.prompts(new McpServerFeatures.SyncPromptSpecification(
|
||||||
new Prompt("code_review", "this is code review prompt", List.of()),
|
new Prompt("code_review", "this is code review prompt", List.of()),
|
||||||
(mcpSyncServerExchange, getPromptRequest) -> null))
|
(mcpSyncServerExchange, getPromptRequest) -> null))
|
||||||
|
|
|
||||||
|
|
@ -360,8 +360,8 @@ public final class McpSchema {
|
||||||
private ResourceCapabilities resources;
|
private ResourceCapabilities resources;
|
||||||
private ToolCapabilities tools;
|
private ToolCapabilities tools;
|
||||||
|
|
||||||
public Builder completions(CompletionCapabilities completions) {
|
public Builder completions() {
|
||||||
this.completions = completions;
|
this.completions = new CompletionCapabilities();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue