Class McpContext.McpClientRequest

java.lang.Object
org.forgerock.openig.mcp.McpContext.McpClientRequest
Enclosing class:
McpContext

public static final class McpContext.McpClientRequest extends Object
A helper object for working with a valid MCP Client request.
See Also:
  • Method Details

    • id

      public JsonValue id()
      Returns the ID of the request if known, can be either a number or a String.
      Returns:
      the ID of the request if known, can be either a number or a String
    • method

      public String method()
      Returns the method of the request.
      Returns:
      the method of the request
    • params

      public JsonValue params()
      Returns the parameters of the request.
      Returns:
      the parameters of the request
    • isNotification

      public boolean isNotification()
      Returns true if this is a notification request.
      Returns:
      true if this is a notification request
    • isInitialize

      public boolean isInitialize()
      Returns true if this is an initialize request.
      Returns:
      true if this is an initialize request
    • clientName

      public String clientName()
      Returns the client name if this is an initialize request, otherwise null.
      Returns:
      the client name if this is an initialize request, otherwise null
    • clientVersion

      public String clientVersion()
      Returns the client version if this is an initialize request, otherwise null.
      Returns:
      the client version if this is an initialize request, otherwise null