Skip to content

Commit a16acf9

Browse files
docs(java-sdk): Fill in missing argument in ServerCapabilities.builder().resources (modelcontextprotocol#360)
Co-authored-by: Christian Tzolov <[email protected]>
1 parent 118f620 commit a16acf9

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

docs/sdk/java/mcp-server.mdx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ The server supports both synchronous and asynchronous APIs, allowing for flexibl
4242
McpSyncServer syncServer = McpServer.sync(transportProvider)
4343
.serverInfo("my-server", "1.0.0")
4444
.capabilities(ServerCapabilities.builder()
45-
.resources(true) // Enable resource support
46-
.tools(true) // Enable tool support
47-
.prompts(true) // Enable prompt support
48-
.logging() // Enable logging support
49-
.completions() // Enable completions support
45+
.resources(false, true) // Enable resource support
46+
.tools(true) // Enable tool support
47+
.prompts(true) // Enable prompt support
48+
.logging() // Enable logging support
49+
.completions() // Enable completions support
5050
.build())
5151
.build();
5252

@@ -68,10 +68,11 @@ syncServer.close();
6868
McpAsyncServer asyncServer = McpServer.async(transportProvider)
6969
.serverInfo("my-server", "1.0.0")
7070
.capabilities(ServerCapabilities.builder()
71-
.resources(true) // Enable resource support
72-
.tools(true) // Enable tool support
73-
.prompts(true) // Enable prompt support
74-
.logging() // Enable logging support
71+
.resources(false, true) // Enable resource support
72+
.tools(true) // Enable tool support
73+
.prompts(true) // Enable prompt support
74+
.logging() // Enable logging support
75+
.completions() // Enable completions support
7576
.build())
7677
.build();
7778

0 commit comments

Comments
 (0)