Package io.modelcontextprotocol.spec
Record Class McpSchema.ServerCapabilities
java.lang.Object
java.lang.Record
io.modelcontextprotocol.spec.McpSchema.ServerCapabilities
- Record Components:
completions- Present if the server supports argument autocompletion suggestionsexperimental- Experimental, non-standard capabilities that the server supportslogging- Present if the server supports sending log messages to the clientprompts- Present if the server offers any prompt templatesresources- Present if the server offers any resources to readtools- Present if the server offers any tools to call
- Enclosing class:
- McpSchema
public static record McpSchema.ServerCapabilities(McpSchema.ServerCapabilities.CompletionCapabilities completions, Map<String,Object> experimental, McpSchema.ServerCapabilities.LoggingCapabilities logging, McpSchema.ServerCapabilities.PromptCapabilities prompts, McpSchema.ServerCapabilities.ResourceCapabilities resources, McpSchema.ServerCapabilities.ToolCapabilities tools)
extends Record
Capabilities that a server may support. Known capabilities are defined here, in
this schema, but this is not a closed set: any server can define its own,
additional capabilities.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final recordPresent if the server supports argument autocompletion suggestions.static final recordPresent if the server supports sending log messages to the client.static final recordPresent if the server offers any prompt templates.static final recordPresent if the server offers any resources to read.static final recordPresent if the server offers any tools to call. -
Constructor Summary
ConstructorsConstructorDescriptionServerCapabilities(McpSchema.ServerCapabilities.CompletionCapabilities completions, Map<String, Object> experimental, McpSchema.ServerCapabilities.LoggingCapabilities logging, McpSchema.ServerCapabilities.PromptCapabilities prompts, McpSchema.ServerCapabilities.ResourceCapabilities resources, McpSchema.ServerCapabilities.ToolCapabilities tools) Creates an instance of aServerCapabilitiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns the value of thecompletionsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexperimentalrecord component.final inthashCode()Returns a hash code value for this object.logging()Returns the value of theloggingrecord component.prompts()Returns the value of thepromptsrecord component.Returns the value of theresourcesrecord component.tools()Returns the value of thetoolsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ServerCapabilities
public ServerCapabilities(McpSchema.ServerCapabilities.CompletionCapabilities completions, Map<String, Object> experimental, McpSchema.ServerCapabilities.LoggingCapabilities logging, McpSchema.ServerCapabilities.PromptCapabilities prompts, McpSchema.ServerCapabilities.ResourceCapabilities resources, McpSchema.ServerCapabilities.ToolCapabilities tools) Creates an instance of aServerCapabilitiesrecord class.- Parameters:
completions- the value for thecompletionsrecord componentexperimental- the value for theexperimentalrecord componentlogging- the value for theloggingrecord componentprompts- the value for thepromptsrecord componentresources- the value for theresourcesrecord componenttools- the value for thetoolsrecord component
-
-
Method Details
-
builder
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
completions
Returns the value of thecompletionsrecord component.- Returns:
- the value of the
completionsrecord component
-
experimental
Returns the value of theexperimentalrecord component.- Returns:
- the value of the
experimentalrecord component
-
logging
Returns the value of theloggingrecord component.- Returns:
- the value of the
loggingrecord component
-
prompts
Returns the value of thepromptsrecord component.- Returns:
- the value of the
promptsrecord component
-
resources
Returns the value of theresourcesrecord component.- Returns:
- the value of the
resourcesrecord component
-
tools
Returns the value of thetoolsrecord component.- Returns:
- the value of the
toolsrecord component
-