Interface Cancellation


public interface Cancellation
Can be used to determine if an MCP client requested a cancellation of an in-progress request.

Tool methods can accept this class as a parameter. It will be automatically injected before the method is invoked.

See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Exception indicating that the result of an MCP request cannot be returned because the request was cancelled by the client.
    static final record 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Perform the check.
    default void
    Perform the check and if cancellation is requested then skip the processing, i.e.