# Uses of Class
com.google.adk.agents.ReadonlyContext

Packages that use ReadonlyContext
Package
Description
com.google.adk.agents
com.google.adk.tools
com.google.adk.tools.applicationintegrationtoolset
com.google.adk.tools.computeruse
com.google.adk.tools.mcp

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

  Subclasses of ReadonlyContext in com.google.adk.agents
  Modifier and Type
  Class
  Description
  `class`
  `CallbackContext`
  The context of various callbacks for an agent invocation.
  Methods in com.google.adk.agents that return types with arguments of type ReadonlyContext
  Modifier and Type
  Method
  Description
  `Function<ReadonlyContext, io.reactivex.rxjava3.core.Single<String>>`
  Instruction.Provider.`getInstruction()`
  Returns the value of the `getInstruction` record component.
  Methods in com.google.adk.agents with parameters of type ReadonlyContext
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Single<Map.Entry<String,Boolean>>`
  LlmAgent.`canonicalGlobalInstruction(ReadonlyContext context)`
  Constructs the text global instruction for this agent based on the `LlmAgent.globalInstruction` field.
  `io.reactivex.rxjava3.core.Single<Map.Entry<String,Boolean>>`
  LlmAgent.`canonicalInstruction(ReadonlyContext context)`
  Constructs the text instruction for this agent based on the `LlmAgent.instruction` 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.
  Constructor parameters in com.google.adk.agents with type arguments of type ReadonlyContext
  Modifier
  Constructor
  Description
  ``
  `Provider(Function<ReadonlyContext, io.reactivex.rxjava3.core.Single<String>> getInstruction)`
  Creates an instance of a `Provider` record class.

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

  Subclasses of ReadonlyContext in com.google.adk.tools
  Modifier and Type
  Class
  Description
  `class`
  `ToolContext`
  ToolContext object provides a structured context for executing tools or functions.
  Methods in com.google.adk.tools with parameters of type ReadonlyContext
  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.
  `default boolean`
  BaseToolset.`isToolSelected(BaseTool tool, @Nullable Object toolFilter, @Nullable ReadonlyContext readonlyContext)`
  Checks if a tool should be selected based on a filter.
  `default boolean`
  ToolPredicate.`test(BaseTool tool, @Nullable ReadonlyContext readonlyContext)`
  Decides if the given tool is selected.
  Method parameters in com.google.adk.tools with type arguments of type ReadonlyContext
  Modifier and Type
  Method
  Description
  `boolean`
  NamedToolPredicate.`test(BaseTool tool, Optional<ReadonlyContext> readonlyContext)`
  `boolean`
  ToolPredicate.`test(BaseTool tool, Optional<ReadonlyContext> readonlyContext)`
  Deprecated.
  Use `ToolPredicate.test(BaseTool, ReadonlyContext)` instead.

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

  Methods in com.google.adk.tools.applicationintegrationtoolset with parameters of type ReadonlyContext
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Flowable<BaseTool>`
  ApplicationIntegrationToolset.`getTools(@Nullable ReadonlyContext readonlyContext)`

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

  Methods in com.google.adk.tools.computeruse with parameters of type ReadonlyContext
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Flowable<BaseTool>`
  ComputerUseToolset.`getTools(ReadonlyContext readonlyContext)`

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

  Methods in com.google.adk.tools.mcp with parameters of type ReadonlyContext
  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)`