Interface ProgressToken


public interface ProgressToken
The progress token sent by the client in a request.

Progress tokens can be either strings or numbers, as defined by the MCP specification.

See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    The type of progress token.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the token value as a number.
    Gets the token value as a string.
    Gets the type of this progress token.
  • Method Details

    • type

      Gets the type of this progress token.
      Returns:
      the token type
    • asInteger

      Number asInteger()
      Gets the token value as a number.
      Returns:
      the numeric value
      Throws:
      IllegalArgumentException - if the token is not a number
    • asString

      String asString()
      Gets the token value as a string.
      Returns:
      the string representation