Enum Class McpClientCapability
- All Implemented Interfaces:
Serializable,Comparable<McpClientCapability>,Constable
A client capability that a tool, prompt or resource cannot work without. Used in
McpTool.requiredCapabilities(), McpPrompt.requiredCapabilities() and
McpResource.requiredCapabilities().
On a 2026-07-28 ("modern") MCP server a client declares its capabilities in every request, and the server may only ask for input whose capability the request declares.
- Since:
- 2.1.0
- Author:
- Christian Tzolov
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionForm mode elicitation (elicitation.form): the method asks the user for structured input.URL mode elicitation (elicitation.url): the method sends the user to a URL.Roots (roots): the method asks the client for its root URIs.Sampling (sampling): the method asks the client's model for a completion. -
Method Summary
Modifier and TypeMethodDescriptionstatic McpClientCapabilityReturns the enum constant of this class with the specified name.static McpClientCapability[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ELICITATION_FORM
Form mode elicitation (elicitation.form): the method asks the user for structured input. -
ELICITATION_URL
URL mode elicitation (elicitation.url): the method sends the user to a URL. -
SAMPLING
Sampling (sampling): the method asks the client's model for a completion. -
ROOTS
Roots (roots): the method asks the client for its root URIs.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-