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

Packages that use ToolContext
Package
Description
com.example
com.example.a2a_basic
com.example.helloworld
com.google.adk.agents
com.google.adk.flows.llmflows
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

- ## Uses of ToolContext in com.example

  Methods in com.example with parameters of type ToolContext
  Modifier and Type
  Method
  Description
  `static Map<String,Object>`
  CustomDieTool.`rollDie(int sides, ToolContext toolContext)`

- ## Uses of ToolContext in com.example.a2a_basic

  Methods in com.example.a2a_basic with parameters of type ToolContext
  Modifier and Type
  Method
  Description
  `static com.google.common.collect.ImmutableMap<String,Object>`
  A2AAgent.`rollDie(int sides, ToolContext toolContext)`

- ## Uses of ToolContext in com.example.helloworld

  Methods in com.example.helloworld with parameters of type ToolContext
  Modifier and Type
  Method
  Description
  `static com.google.common.collect.ImmutableMap<String,Object>`
  HelloWorldAgent.`rollDie(int sides, ToolContext toolContext)`

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

  Methods in com.google.adk.agents with parameters of type ToolContext
  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 ToolContext in com.google.adk.flows.llmflows

  Methods in com.google.adk.flows.llmflows with parameters of type ToolContext
  Modifier and Type
  Method
  Description
  `static void`
  AgentTransfer.`transferToAgent(String agentName, ToolContext toolContext)`

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

  Methods in com.google.adk.plugins with parameters of type ToolContext
  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 ToolContext in com.google.adk.plugins.agentanalytics

  Methods in com.google.adk.plugins.agentanalytics with parameters of type ToolContext
  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 ToolContext in com.google.adk.tools

  Methods in com.google.adk.tools that return ToolContext
  Modifier and Type
  Method
  Description
  `ToolContext`
  ToolContext.Builder.`build()`
  Methods in com.google.adk.tools with parameters of type ToolContext
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Completable`
  LoadArtifactsTool.`appendArtifactsToLlmRequest(LlmRequest.Builder llmRequestBuilder, ToolContext toolContext)`
  `io.reactivex.rxjava3.core.Flowable<Map<String,Object>>`
  FunctionTool.`callLive(Map<String,Object> args, ToolContext toolContext, InvocationContext invocationContext)`
  `static void`
  ExitLoopTool.`exitLoop(ToolContext toolContext)`
  Exit the `LoopAgent` execution.
  `static io.reactivex.rxjava3.core.Single<LoadMemoryResponse>`
  LoadMemoryTool.`loadMemory(String query, ToolContext toolContext)`
  Loads the memory for the current user.
  `io.reactivex.rxjava3.core.Completable`
  BaseTool.`processLlmRequest(LlmRequest.Builder llmRequestBuilder, ToolContext toolContext)`
  Processes the outgoing `LlmRequest.Builder`.
  `io.reactivex.rxjava3.core.Completable`
  BuiltInCodeExecutionTool.`processLlmRequest(LlmRequest.Builder llmRequestBuilder, ToolContext toolContext)`
  `io.reactivex.rxjava3.core.Completable`
  ExampleTool.`processLlmRequest(LlmRequest.Builder llmRequestBuilder, ToolContext toolContext)`
  `io.reactivex.rxjava3.core.Completable`
  GoogleMapsTool.`processLlmRequest(LlmRequest.Builder llmRequestBuilder, ToolContext toolContext)`
  `io.reactivex.rxjava3.core.Completable`
  GoogleSearchTool.`processLlmRequest(LlmRequest.Builder llmRequestBuilder, ToolContext toolContext)`
  `io.reactivex.rxjava3.core.Completable`
  LoadArtifactsTool.`processLlmRequest(LlmRequest.Builder llmRequestBuilder, ToolContext toolContext)`
  `io.reactivex.rxjava3.core.Completable`
  LoadMemoryTool.`processLlmRequest(LlmRequest.Builder llmRequestBuilder, ToolContext toolContext)`
  `io.reactivex.rxjava3.core.Completable`
  UrlContextTool.`processLlmRequest(LlmRequest.Builder llmRequestBuilder, ToolContext toolContext)`
  `io.reactivex.rxjava3.core.Completable`
  VertexAiSearchTool.`processLlmRequest(LlmRequest.Builder llmRequestBuilder, ToolContext toolContext)`
  `io.reactivex.rxjava3.core.Single<Map<String,Object>>`
  AgentTool.`runAsync(Map<String,Object> args, ToolContext toolContext)`
  `final <I,O> io.reactivex.rxjava3.core.Single<O>`
  BaseTool.`runAsync(I args, ToolContext toolContext, com.fasterxml.jackson.core.type.TypeReference<? extends O> typeReference)`
  Calls a tool with generic arguments, returning the results converted to a specified type reference.
  `final <I,O> io.reactivex.rxjava3.core.Single<O>`
  BaseTool.`runAsync(I args, ToolContext toolContext, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.fasterxml.jackson.core.type.TypeReference<? extends O> typeReference)`
  Calls a tool with generic arguments and a custom `ObjectMapper`, returning the results converted to a specified type reference.
  `final <I,O> io.reactivex.rxjava3.core.Single<O>`
  BaseTool.`runAsync(I args, ToolContext toolContext, com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<? extends O> oClass)`
  Calls a tool with generic arguments and a custom `ObjectMapper`, returning the results converted to a specified class.
  `final <I,O> io.reactivex.rxjava3.core.Single<O>`
  BaseTool.`runAsync(I args, ToolContext toolContext, Class<? extends O> oClass)`
  Calls a tool with generic arguments, returning the results converted to a specified class.
  `io.reactivex.rxjava3.core.Single<Map<String,Object>>`
  BaseTool.`runAsync(Map<String,Object> args, ToolContext toolContext)`
  Calls a tool.
  `final <T> io.reactivex.rxjava3.core.Single<Map<String,Object>>`
  BaseTool.`runAsync(T args, ToolContext toolContext)`
  Calls a tool with generic arguments and returns a map of results.
  `final <T> io.reactivex.rxjava3.core.Single<Map<String,Object>>`
  BaseTool.`runAsync(T args, ToolContext toolContext, com.fasterxml.jackson.databind.ObjectMapper objectMapper)`
  Calls a tool with generic arguments using a custom `ObjectMapper` and returns a map of results.
  `io.reactivex.rxjava3.core.Single<Map<String,Object>>`
  FunctionTool.`runAsync(Map<String,Object> args, ToolContext toolContext)`
  `io.reactivex.rxjava3.core.Single<Map<String,Object>>`
  LoadArtifactsTool.`runAsync(Map<String,Object> args, ToolContext toolContext)`
  `io.reactivex.rxjava3.core.Single<Map<String,Object>>`
  SetModelResponseTool.`runAsync(Map<String,Object> args, ToolContext toolContext)`

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

  Methods in com.google.adk.tools.applicationintegrationtoolset with parameters of type ToolContext
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Single<Map<String,Object>>`
  IntegrationConnectorTool.`runAsync(Map<String,Object> args, ToolContext toolContext)`

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

  Methods in com.google.adk.tools.computeruse with parameters of type ToolContext
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Completable`
  ComputerUseToolset.`processLlmRequest(LlmRequest.Builder llmRequestBuilder, ToolContext toolContext)`
  Adds computer use configuration to the LLM request.
  `io.reactivex.rxjava3.core.Single<Map<String,Object>>`
  ComputerUseTool.`runAsync(Map<String,Object> args, ToolContext toolContext)`

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

  Methods in com.google.adk.tools.mcp with parameters of type ToolContext
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Single<Map<String,Object>>`
  McpAsyncTool.`runAsync(Map<String,Object> args, ToolContext toolContext)`
  `io.reactivex.rxjava3.core.Single<Map<String,Object>>`
  McpTool.`runAsync(Map<String,Object> args, ToolContext toolContext)`

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

  Methods in com.google.adk.tools.retrieval with parameters of type ToolContext
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Completable`
  VertexAiRagRetrieval.`processLlmRequest(LlmRequest.Builder llmRequestBuilder, ToolContext toolContext)`
  `io.reactivex.rxjava3.core.Single<Map<String,Object>>`
  VertexAiRagRetrieval.`runAsync(Map<String,Object> args, ToolContext toolContext)`