Interface ToolErrorListener

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ToolErrorListener
Listener for tool execution error events.

Register with McpRequestHandler.addToolErrorListener(listener) to receive structured error notifications when tool executions fail.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when a tool execution fails.
  • Method Details

    • onToolError

      void onToolError(ToolErrorEvent event)
      Called when a tool execution fails.
      Parameters:
      event - the structured error event