Interface ToolCallListener


public interface ToolCallListener
Listener for tool call lifecycle events.

Used by CLI to render tool call visualization (spinners, results). Set via AgentToolExecutor.setToolCallListener(ToolCallListener).

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onToolCallComplete(String toolName, Object result, boolean success, long latencyMs)
    Called after a tool call completes (success or failure).
    void
    onToolCallStart(String toolName, Map<String,Object> arguments)
    Called before a tool call is executed.
  • Method Details

    • onToolCallStart

      void onToolCallStart(String toolName, Map<String,Object> arguments)
      Called before a tool call is executed.
      Parameters:
      toolName - the name of the tool
      arguments - the arguments passed to the tool
    • onToolCallComplete

      void onToolCallComplete(String toolName, Object result, boolean success, long latencyMs)
      Called after a tool call completes (success or failure).
      Parameters:
      toolName - the name of the tool
      result - the result (or error message)
      success - true if the call succeeded
      latencyMs - execution time in milliseconds