Enum Class McpServerMethod

java.lang.Object
java.lang.Enum<McpServerMethod>
dev.langchain4j.mcp.protocol.McpServerMethod
All Implemented Interfaces:
Serializable, Comparable<McpServerMethod>, Constable

public enum McpServerMethod extends Enum<McpServerMethod>
Enum representing method names for server-initiated MCP messages.
  • Enum Constant Details

    • PING

      public static final McpServerMethod PING
    • ROOTS_LIST

      public static final McpServerMethod ROOTS_LIST
    • NOTIFICATION_MESSAGE

      public static final McpServerMethod NOTIFICATION_MESSAGE
    • NOTIFICATION_TOOLS_LIST_CHANGED

      public static final McpServerMethod NOTIFICATION_TOOLS_LIST_CHANGED
    • NOTIFICATION_RESOURCES_LIST_CHANGED

      public static final McpServerMethod NOTIFICATION_RESOURCES_LIST_CHANGED
    • NOTIFICATION_PROMPTS_LIST_CHANGED

      public static final McpServerMethod NOTIFICATION_PROMPTS_LIST_CHANGED
    • NOTIFICATION_RESOURCES_UPDATED

      public static final McpServerMethod NOTIFICATION_RESOURCES_UPDATED
    • NOTIFICATION_PROGRESS

      public static final McpServerMethod NOTIFICATION_PROGRESS
  • Method Details

    • values

      public static McpServerMethod[] 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

      public static McpServerMethod valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
    • from

      public static McpServerMethod from(String value)