Interface BaseToolset

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
ApplicationIntegrationToolset, ComputerUseToolset, McpAsyncToolset, McpToolset, SkillToolset

public interface BaseToolset extends AutoCloseable
Base interface for toolsets.
  • Method Details

    • processLlmRequest

      default io.reactivex.rxjava3.core.Completable processLlmRequest(LlmRequest.Builder llmRequestBuilder, ToolContext toolContext)
      Processes the outgoing LlmRequest.Builder.
    • getTools

      io.reactivex.rxjava3.core.Flowable<BaseTool> getTools(ReadonlyContext readonlyContext)
      Return all tools in the toolset based on the provided context.
      Parameters:
      readonlyContext - Context used to filter tools available to the agent.
      Returns:
      A Flowable emitting tools available under the specified context.
    • close

      void close() throws Exception
      Performs cleanup and releases resources held by the toolset.

      NOTE: This method is invoked, for example, at the end of an agent server's lifecycle or when the toolset is no longer needed. Implementations should ensure that any open connections, files, or other managed resources are properly released to prevent leaks.

      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception
    • isToolSelected

      default boolean isToolSelected(BaseTool tool, @Nullable Object toolFilter, @Nullable ReadonlyContext readonlyContext)
      Checks if a tool should be selected based on a filter.
      Parameters:
      tool - The tool to check.
      toolFilter - A ToolPredicate, a List of tool names, or null.
      readonlyContext - The context for checking the tool, or null.