Class SpringAiTool

java.lang.Object
com.google.adk.tools.BaseTool
com.google.adk.models.springai.SpringAiTool

public final class SpringAiTool extends BaseTool
Exposes a Spring AI ToolCallback as an ADK BaseTool, so an existing Spring AI tool can be used by any ADK agent and model. Name, description, and input schema come from the callback's ToolDefinition; the schema is passed through as FunctionDeclaration.parametersJsonSchema(). The ADK ToolContext is passed to the callback under ToolConverter.ADK_TOOL_CONTEXT_KEY, and a returnDirect callback maps to ADK's skipSummarization.
  • Constructor Details

    • SpringAiTool

      public SpringAiTool(org.springframework.ai.tool.ToolCallback toolCallback)
      Wraps toolCallback as an ADK tool.
      Parameters:
      toolCallback - The Spring AI tool to wrap
  • Method Details