Package org.mcpjava.server.progress
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 -
Method Summary
-
Method Details
-
type
ProgressToken.Type 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
-