ADK for TypeScript: API Reference
    Preparing search index...

    Type Alias SingleBeforeToolCallback

    SingleBeforeToolCallback: (
        params: { args: Dict; context: ToolContext; tool: BaseTool },
    ) => Dict | undefined | Promise<Dict | undefined>

    A callback that runs before a tool is called.

    Type Declaration

      • (
            params: { args: Dict; context: ToolContext; tool: BaseTool },
        ): Dict | undefined | Promise<Dict | undefined>
      • Parameters

        Returns Dict | undefined | Promise<Dict | undefined>

        The tool response. When present, the returned tool response will be used and the framework will skip calling the actual tool.