# Uses of Class
com.google.adk.tools.BaseTool

Packages that use BaseTool
Package
Description
com.google.adk.agents
com.google.adk.flows.llmflows
com.google.adk.models
com.google.adk.models.springai
com.google.adk.plugins
com.google.adk.plugins.agentanalytics
com.google.adk.tools
com.google.adk.tools.applicationintegrationtoolset
com.google.adk.tools.computeruse
com.google.adk.tools.mcp
com.google.adk.tools.retrieval
com.google.adk.utils

- ## Uses of BaseTool in com.google.adk.agents

  Methods in com.google.adk.agents that return types with arguments of type BaseTool
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Flowable<BaseTool>`
  LlmAgent.`canonicalTools()`
  Constructs the list of tools for this agent based on the `LlmAgent.tools()` field.
  `io.reactivex.rxjava3.core.Flowable<BaseTool>`
  LlmAgent.`canonicalTools(@Nullable ReadonlyContext context)`
  Constructs the list of tools for this agent based on the `LlmAgent.tools()` field.
  `io.reactivex.rxjava3.core.Single<List<BaseTool>>`
  LlmAgent.`tools()`
  Methods in com.google.adk.agents with parameters of type BaseTool
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Maybe<Map<String,Object>>`
  Callbacks.AfterToolCallback.`call(InvocationContext invocationContext, BaseTool baseTool, Map<String,Object> input, ToolContext toolContext, Object response)`
  Async callback after tool runs.
  `Optional<Map<String,Object>>`
  Callbacks.AfterToolCallbackSync.`call(InvocationContext invocationContext, BaseTool baseTool, Map<String,Object> input, ToolContext toolContext, Object response)`
  `io.reactivex.rxjava3.core.Maybe<Map<String,Object>>`
  Callbacks.BeforeToolCallback.`call(InvocationContext invocationContext, BaseTool baseTool, Map<String,Object> input, ToolContext toolContext)`
  Async callback before tool runs.
  `Optional<Map<String,Object>>`
  Callbacks.BeforeToolCallbackSync.`call(InvocationContext invocationContext, BaseTool baseTool, Map<String,Object> input, ToolContext toolContext)`
  `io.reactivex.rxjava3.core.Maybe<Map<String,Object>>`
  Callbacks.OnToolErrorCallback.`call(InvocationContext invocationContext, BaseTool baseTool, Map<String,Object> input, ToolContext toolContext, Exception error)`
  Async callback when tool call fails.
  `Optional<Map<String,Object>>`
  Callbacks.OnToolErrorCallbackSync.`call(InvocationContext invocationContext, BaseTool baseTool, Map<String,Object> input, ToolContext toolContext, Exception error)`

- ## Uses of BaseTool in com.google.adk.flows.llmflows

  Method parameters in com.google.adk.flows.llmflows with type arguments of type BaseTool
  Modifier and Type
  Method
  Description
  `static Set<String>`
  Functions.`getLongRunningFunctionCalls(List<com.google.genai.types.FunctionCall> functionCalls, Map<String,BaseTool> tools)`
  `static io.reactivex.rxjava3.core.Maybe<Event>`
  Functions.`handleFunctionCalls(InvocationContext invocationContext, Event functionCallEvent, Map<String,BaseTool> tools)`
  Handles standard, non-streaming function calls.
  `static io.reactivex.rxjava3.core.Maybe<Event>`
  Functions.`handleFunctionCalls(InvocationContext invocationContext, Event functionCallEvent, Map<String,BaseTool> tools, Map<String, ToolConfirmation> toolConfirmations)`
  Handles standard, non-streaming function calls with tool confirmations.
  `static io.reactivex.rxjava3.core.Maybe<Event>`
  Functions.`handleFunctionCallsLive(InvocationContext invocationContext, Event functionCallEvent, Map<String,BaseTool> tools)`
  Handles function calls in a live/streaming context, supporting background execution and stream termination.
  `static io.reactivex.rxjava3.core.Maybe<Event>`
  Functions.`handleFunctionCallsLive(InvocationContext invocationContext, Event functionCallEvent, Map<String,BaseTool> tools, Map<String, ToolConfirmation> toolConfirmations)`
  Handles function calls in a live/streaming context with tool confirmations, supporting background execution and stream termination.

- ## Uses of BaseTool in com.google.adk.models

  Methods in com.google.adk.models that return types with arguments of type BaseTool
  Modifier and Type
  Method
  Description
  `abstract Map<String,BaseTool>`
  LlmRequest.`tools()`
  Returns a map of tools available to the LLM.
  Method parameters in com.google.adk.models with type arguments of type BaseTool
  Modifier and Type
  Method
  Description
  `final LlmRequest.Builder`
  LlmRequest.Builder.`appendTools(List<BaseTool> tools)`
  `abstract LlmRequest.Builder`
  LlmRequest.Builder.`tools(Map<String,BaseTool> tools)`

- ## Uses of BaseTool in com.google.adk.models.springai

  Method parameters in com.google.adk.models.springai with type arguments of type BaseTool
  Modifier and Type
  Method
  Description
  `List<org.springframework.ai.tool.ToolCallback>`
  ToolConverter.`convertToSpringAiTools(Map<String,BaseTool> tools)`
  Converts ADK tools to Spring AI ToolCallback format for tool calling.
  `Map<String, ToolConverter.ToolMetadata>`
  ToolConverter.`createToolRegistry(Map<String,BaseTool> tools)`
  Creates a tool registry from ADK tools for internal tracking.

- ## Uses of BaseTool in com.google.adk.plugins

  Methods in com.google.adk.plugins with parameters of type BaseTool
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Maybe<Map<String,Object>>`
  LoggingPlugin.`afterToolCallback(BaseTool tool, Map<String,Object> toolArgs, ToolContext toolContext, Map<String,Object> result)`
  `default io.reactivex.rxjava3.core.Maybe<Map<String,Object>>`
  Plugin.`afterToolCallback(BaseTool tool, Map<String,Object> toolArgs, ToolContext toolContext, Map<String,Object> result)`
  Callback executed after a tool has been called.
  `io.reactivex.rxjava3.core.Maybe<Map<String,Object>>`
  PluginManager.`afterToolCallback(BaseTool tool, Map<String,Object> toolArgs, ToolContext toolContext, Map<String,Object> result)`
  `io.reactivex.rxjava3.core.Maybe<Map<String,Object>>`
  LoggingPlugin.`beforeToolCallback(BaseTool tool, Map<String,Object> toolArgs, ToolContext toolContext)`
  `default io.reactivex.rxjava3.core.Maybe<Map<String,Object>>`
  Plugin.`beforeToolCallback(BaseTool tool, Map<String,Object> toolArgs, ToolContext toolContext)`
  Callback executed before a tool is called.
  `io.reactivex.rxjava3.core.Maybe<Map<String,Object>>`
  PluginManager.`beforeToolCallback(BaseTool tool, Map<String,Object> toolArgs, ToolContext toolContext)`
  `io.reactivex.rxjava3.core.Maybe<Map<String,Object>>`
  ReplayPlugin.`beforeToolCallback(BaseTool tool, Map<String,Object> toolArgs, ToolContext toolContext)`
  `io.reactivex.rxjava3.core.Maybe<Map<String,Object>>`
  LoggingPlugin.`onToolErrorCallback(BaseTool tool, Map<String,Object> toolArgs, ToolContext toolContext, Throwable error)`
  `default io.reactivex.rxjava3.core.Maybe<Map<String,Object>>`
  Plugin.`onToolErrorCallback(BaseTool tool, Map<String,Object> toolArgs, ToolContext toolContext, Throwable error)`
  Callback executed when a tool call encounters an error.
  `io.reactivex.rxjava3.core.Maybe<Map<String,Object>>`
  PluginManager.`onToolErrorCallback(BaseTool tool, Map<String,Object> toolArgs, ToolContext toolContext, Throwable error)`

- ## Uses of BaseTool in com.google.adk.plugins.agentanalytics

  Methods in com.google.adk.plugins.agentanalytics with parameters of type BaseTool
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Maybe<Map<String,Object>>`
  BigQueryAgentAnalyticsPlugin.`afterToolCallback(BaseTool tool, Map<String,Object> toolArgs, ToolContext toolContext, Map<String,Object> result)`
  `io.reactivex.rxjava3.core.Maybe<Map<String,Object>>`
  BigQueryAgentAnalyticsPlugin.`beforeToolCallback(BaseTool tool, Map<String,Object> toolArgs, ToolContext toolContext)`
  `io.reactivex.rxjava3.core.Maybe<Map<String,Object>>`
  BigQueryAgentAnalyticsPlugin.`onToolErrorCallback(BaseTool tool, Map<String,Object> toolArgs, ToolContext toolContext, Throwable error)`

- ## Uses of BaseTool in com.google.adk.tools

  Subclasses of BaseTool in com.google.adk.tools
  Modifier and Type
  Class
  Description
  `class`
  `AgentTool`
  AgentTool implements a tool that allows an agent to call another agent.
  `final class`
  `BuiltInCodeExecutionTool`
  A built-in code execution tool that is automatically invoked by Gemini 2 models.
  `final class`
  `ExampleTool`
  A tool that injects (few-shot) examples into the outgoing LLM request as system instructions.
  `class`
  `FunctionTool`
  FunctionTool implements a customized function calling tool.
  `class`
  `GoogleMapsTool`
  A built-in tool that is automatically invoked by Gemini 2 models to retrieve search results from Google Maps.
  `class`
  `GoogleSearchAgentTool`
  A tool that wraps a sub-agent that only uses google_search tool.
  `final class`
  `GoogleSearchTool`
  A built-in tool that is automatically invoked by Gemini 2 and 3 models to retrieve search results from Google Search.
  `final class`
  `LoadArtifactsTool`
  A tool that loads artifacts and adds them to the session.
  `class`
  `LoadMemoryTool`
  A tool that loads memory for the current user.
  `class`
  `LongRunningFunctionTool`
  A function tool that returns the result asynchronously.
  `class`
  `SetModelResponseTool`
  Internal tool used for output schema workaround.
  `final class`
  `UrlContextTool`
  A built-in tool that is automatically invoked by Gemini 2 and 3 models to retrieve information from the given URLs.
  `class`
  `VertexAiSearchAgentTool`
  A tool that wraps a sub-agent that only uses vertex_ai_search tool.
  `class`
  `VertexAiSearchTool`
  A built-in tool using Vertex AI Search.
  Methods in com.google.adk.tools that return BaseTool
  Modifier and Type
  Method
  Description
  `static BaseTool`
  AgentTool.`fromConfig(BaseTool.ToolArgsConfig args, String configAbsPath)`
  `static BaseTool`
  BaseTool.`fromConfig(BaseTool.ToolConfig config, String configAbsPath)`
  Creates a tool instance from a config.
  Methods in com.google.adk.tools that return types with arguments of type BaseTool
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Flowable<BaseTool>`
  BaseToolset.`getTools(ReadonlyContext readonlyContext)`
  Return all tools in the toolset based on the provided context.
  Methods in com.google.adk.tools with parameters of type BaseTool
  Modifier and Type
  Method
  Description
  `default boolean`
  BaseToolset.`isToolSelected(BaseTool tool, @Nullable Object toolFilter, @Nullable ReadonlyContext readonlyContext)`
  Checks if a tool should be selected based on a filter.
  `boolean`
  NamedToolPredicate.`test(BaseTool tool, Optional<ReadonlyContext> readonlyContext)`
  `default boolean`
  ToolPredicate.`test(BaseTool tool, @Nullable ReadonlyContext readonlyContext)`
  Decides if the given tool is selected.
  `boolean`
  ToolPredicate.`test(BaseTool tool, Optional<ReadonlyContext> readonlyContext)`
  Deprecated.
  Use `ToolPredicate.test(BaseTool, ReadonlyContext)` instead.

- ## Uses of BaseTool in com.google.adk.tools.applicationintegrationtoolset

  Subclasses of BaseTool in com.google.adk.tools.applicationintegrationtoolset
  Modifier and Type
  Class
  Description
  `class`
  `IntegrationConnectorTool`
  Application Integration Tool
  Methods in com.google.adk.tools.applicationintegrationtoolset that return types with arguments of type BaseTool
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Flowable<BaseTool>`
  ApplicationIntegrationToolset.`getTools(@Nullable ReadonlyContext readonlyContext)`

- ## Uses of BaseTool in com.google.adk.tools.computeruse

  Subclasses of BaseTool in com.google.adk.tools.computeruse
  Modifier and Type
  Class
  Description
  `class`
  `ComputerUseTool`
  A tool that wraps computer control functions for use with LLMs.
  Methods in com.google.adk.tools.computeruse that return types with arguments of type BaseTool
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Flowable<BaseTool>`
  ComputerUseToolset.`getTools(ReadonlyContext readonlyContext)`

- ## Uses of BaseTool in com.google.adk.tools.mcp

  Subclasses of BaseTool in com.google.adk.tools.mcp
  Modifier and Type
  Class
  Description
  `class`
  `AbstractMcpTool<T>`
  Base class for MCP tools.
  `final class`
  `McpAsyncTool`
  Initializes a MCP tool.
  `final class`
  `McpTool`
  Initializes a MCP tool.
  Methods in com.google.adk.tools.mcp that return types with arguments of type BaseTool
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Flowable<BaseTool>`
  McpAsyncToolset.`getTools(ReadonlyContext readonlyContext)`
  `io.reactivex.rxjava3.core.Flowable<BaseTool>`
  McpToolset.`getTools(ReadonlyContext readonlyContext)`
  Methods in com.google.adk.tools.mcp with parameters of type BaseTool
  Modifier and Type
  Method
  Description
  `io.modelcontextprotocol.spec.McpSchema.Tool`
  ConversionUtils.`adkToMcpToolType(BaseTool tool)`

- ## Uses of BaseTool in com.google.adk.tools.retrieval

  Subclasses of BaseTool in com.google.adk.tools.retrieval
  Modifier and Type
  Class
  Description
  `class`
  `BaseRetrievalTool`
  Base class for retrieval tools.
  `class`
  `VertexAiRagRetrieval`
  A retrieval tool that fetches context from Vertex AI RAG.

- ## Uses of BaseTool in com.google.adk.utils

  Methods in com.google.adk.utils that return types with arguments of type BaseTool
  Modifier and Type
  Method
  Description
  `default List<Class<? extends BaseTool>>`
  AdkComponentProvider.`getToolClasses()`
  Returns a list of tool classes to register.
  `List<Class<? extends BaseTool>>`
  CoreAdkComponentProvider.`getToolClasses()`
  Returns tool classes for `AgentTool`, `LongRunningFunctionTool` and `ExampleTool`.
  `Map<String,BaseTool>`
  AdditionalAdkComponentProvider.`getToolInstances()`
  Returns tool instances for `GoogleSearchTool` and `GoogleMapsTool`.
  `default Map<String,BaseTool>`
  AdkComponentProvider.`getToolInstances()`
  Returns a map of tool instances to register, with tool name as key.
  `Map<String,BaseTool>`
  CoreAdkComponentProvider.`getToolInstances()`
  Returns tool instances for `LoadArtifactsTool`, `ExitLoopTool` and `UrlContextTool`.
  `static Optional<Class<? extends BaseTool>>`
  ComponentRegistry.`resolveToolClass(String toolClassName)`
  Resolves the tool class based on the tool class name from the configuration.
  `static Optional<BaseTool>`
  ComponentRegistry.`resolveToolInstance(String name)`