Record Class McpToolInvocationImpl

java.lang.Object
java.lang.Record
eu.mrapik.minecraftservermcp.internal.McpToolInvocationImpl
Record Components:
exchange - MCP session exchange for this request
request - raw tool call (name and JSON arguments)
profile - access profile for the authenticated token
toolConfig - merged policy for this tool id under that profile
mcpPlugin - MCP plugin instance
serverPaths - server root path helpers
pluginSettings - 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 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 a McpToolInvocationImpl record class.
      Parameters:
      exchange - the value for the exchange record component
      request - the value for the request record component
      profile - the value for the profile record component
      toolConfig - the value for the toolConfig record component
      mcpPlugin - the value for the mcpPlugin record component
      serverPaths - the value for the serverPaths record component
      pluginSettings - the value for the pluginSettings record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • exchange

      public io.modelcontextprotocol.server.McpAsyncServerExchange exchange()
      Returns the value of the exchange record component.
      Specified by:
      exchange in interface McpToolInvocation
      Returns:
      the value of the exchange record component
    • request

      public io.modelcontextprotocol.spec.McpSchema.CallToolRequest request()
      Returns the value of the request record component.
      Specified by:
      request in interface McpToolInvocation
      Returns:
      the value of the request record component
    • profile

      public TokenAccessProfile profile()
      Returns the value of the profile record component.
      Specified by:
      profile in interface McpToolInvocation
      Returns:
      the value of the profile record component
    • toolConfig

      public ToolAccessConfig toolConfig()
      Returns the value of the toolConfig record component.
      Specified by:
      toolConfig in interface McpToolInvocation
      Returns:
      the value of the toolConfig record component
    • mcpPlugin

      public JavaPlugin mcpPlugin()
      Returns the value of the mcpPlugin record component.
      Specified by:
      mcpPlugin in interface McpToolInvocation
      Returns:
      the value of the mcpPlugin record component
    • serverPaths

      public ServerFilePaths serverPaths()
      Returns the value of the serverPaths record component.
      Specified by:
      serverPaths in interface McpToolInvocation
      Returns:
      the value of the serverPaths record component
    • pluginSettings

      public PluginSettings pluginSettings()
      Returns the value of the pluginSettings record component.
      Specified by:
      pluginSettings in interface McpToolInvocation
      Returns:
      the value of the pluginSettings record component