Readonly[Optional ReadonlyprefixReadonlytoolCloses 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.
A Promise that resolves when the toolset is closed.
Returns the generated tools.
The first call fetches the spec and builds the tools. Concurrent calls share that load. When it fails, the next call tries again.
ProtectedisReturns whether the tool should be exposed to LLM.
The tool to check.
Context used to filter tools available to the agent.
Whether the tool should be exposed to LLM.
Processes the outgoing LLM request for this toolset. This method will be called before each tool processes the llm request.
Use cases:
The context of the tool.
The outgoing LLM request, mutable this method.
A toolset generated from a Google Cloud Application Integration API trigger, or from the entity operations and actions of an Integration Connectors connection.
The constructor only validates the options. The first
getToolscall fetches the spec and builds the tools, and later calls reuse them.Example
Example