ClientCapabilitiesBuilder
DSL builder for constructing ClientCapabilities instances.
This builder is used within InitializeRequestBuilder to configure client capabilities. All capabilities are optional - the presence of a capability indicates support for that feature.
Available Functions (all optional)
sampling - Indicates support for sampling from an LLM
roots - Indicates support for listing roots
elicitation - Indicates support for elicitation from the server
experimental - Defines experimental, non-standard capabilities
Example usage within buildInitializeRequest:
val request = buildInitializeRequest {
protocolVersion = "1.0"
capabilities {
sampling(ClientCapabilities.sampling)
roots(listChanged = true)
experimental {
put("customFeature", JsonPrimitive(true))
}
}
info("MyClient", "1.0.0")
}See also
Functions
Indicates that the client supports elicitation from the server with custom configuration.
Indicates that the client supports elicitation from the server.
Defines experimental, non-standard capabilities that the client supports using a DSL builder.
Defines experimental, non-standard capabilities that the client supports.
Indicates that the client supports sampling from an LLM with custom configuration.
Indicates that the client supports sampling from an LLM.