Record Class McpToolInvocationImpl
java.lang.Object
java.lang.Record
eu.mrapik.minecraftservermcp.internal.McpToolInvocationImpl
- Record Components:
exchange- MCP session exchange for this requestrequest- raw tool call (name and JSON arguments)profile- access profile for the authenticated tokentoolConfig- merged policy for this tool id under that profilemcpPlugin- MCP plugin instanceserverPaths- server root path helperspluginSettings- snapshot of global settings at construction time
- All Implemented Interfaces:
McpToolInvocation
public record McpToolInvocationImpl(io.modelcontextprotocol.server.McpAsyncServerExchange exchange, io.modelcontextprotocol.spec.McpSchema.CallToolRequest request, TokenAccessProfile profile, ToolAccessConfig toolConfig, JavaPlugin mcpPlugin, ServerFilePaths serverPaths, PluginSettings pluginSettings)
extends Record
implements McpToolInvocation
Immutable record holding all fields for
McpToolInvocation; constructed by ToolInvocationGate
after the token and tool policy have been validated.-
Constructor Summary
ConstructorsConstructorDescriptionMcpToolInvocationImpl(io.modelcontextprotocol.server.McpAsyncServerExchange exchange, io.modelcontextprotocol.spec.McpSchema.CallToolRequest request, TokenAccessProfile profile, ToolAccessConfig toolConfig, JavaPlugin mcpPlugin, ServerFilePaths serverPaths, PluginSettings pluginSettings) Creates an instance of aMcpToolInvocationImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.io.modelcontextprotocol.server.McpAsyncServerExchangeexchange()Returns the value of theexchangerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of themcpPluginrecord component.Returns the value of thepluginSettingsrecord component.profile()Returns the value of theprofilerecord component.io.modelcontextprotocol.spec.McpSchema.CallToolRequestrequest()Returns the value of therequestrecord component.Returns the value of theserverPathsrecord component.Returns the value of thetoolConfigrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
McpToolInvocationImpl
public McpToolInvocationImpl(io.modelcontextprotocol.server.McpAsyncServerExchange exchange, io.modelcontextprotocol.spec.McpSchema.CallToolRequest request, TokenAccessProfile profile, ToolAccessConfig toolConfig, JavaPlugin mcpPlugin, ServerFilePaths serverPaths, PluginSettings pluginSettings) Creates an instance of aMcpToolInvocationImplrecord class.- Parameters:
exchange- the value for theexchangerecord componentrequest- the value for therequestrecord componentprofile- the value for theprofilerecord componenttoolConfig- the value for thetoolConfigrecord componentmcpPlugin- the value for themcpPluginrecord componentserverPaths- the value for theserverPathsrecord componentpluginSettings- the value for thepluginSettingsrecord component
-
-
Method Details
-
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). -
exchange
public io.modelcontextprotocol.server.McpAsyncServerExchange exchange()Returns the value of theexchangerecord component.- Specified by:
exchangein interfaceMcpToolInvocation- Returns:
- the value of the
exchangerecord component
-
request
public io.modelcontextprotocol.spec.McpSchema.CallToolRequest request()Returns the value of therequestrecord component.- Specified by:
requestin interfaceMcpToolInvocation- Returns:
- the value of the
requestrecord component
-
profile
Returns the value of theprofilerecord component.- Specified by:
profilein interfaceMcpToolInvocation- Returns:
- the value of the
profilerecord component
-
toolConfig
Returns the value of thetoolConfigrecord component.- Specified by:
toolConfigin interfaceMcpToolInvocation- Returns:
- the value of the
toolConfigrecord component
-
mcpPlugin
Returns the value of themcpPluginrecord component.- Specified by:
mcpPluginin interfaceMcpToolInvocation- Returns:
- the value of the
mcpPluginrecord component
-
serverPaths
Returns the value of theserverPathsrecord component.- Specified by:
serverPathsin interfaceMcpToolInvocation- Returns:
- the value of the
serverPathsrecord component
-
pluginSettings
Returns the value of thepluginSettingsrecord component.- Specified by:
pluginSettingsin interfaceMcpToolInvocation- Returns:
- the value of the
pluginSettingsrecord component
-